Jump to content

návod YSI


Guest ShockyCZE

Recommended Posts

Guest ShockyCZE

Autorem je Y_Less

 

Čaute,připravil jsem pro vás Y_Objects To je že můžete mít víc objektů než 150.Tento TUT vám pomůže mit objektů až 1 000 000 A bez padání serveru!.Takže prvni si stahněte INCLUDE Y_Objects,pak to vložte do složky v pawnu INCLUDE.

 

!VKLÁDEJTE!

 

Nahoru do módu

Kód:

#include

 

public OnGameModeInit()

Kód:

Object_Object();

 

public OnPlayerDisconnect(playerid, reason)

 

Kód:

Object_OnPlayerDisconnect( playerid, reason);

 

A nyní přejmenujeme Objecty:

 

Z

Kód:

CreateObject

na

Kód:

CreateDynamicObject

 

 

Takže např to bude takto z:

Kód:

CreateObject(3461,-1966.837,296.396,36.102,0.0,0.0,0.0);

CreateObject(3461,-1966.916,291.694,35.993,0.0,0.0,0.0);

CreateObject(1284,-1991.331,290.408,36.379,0.0,0.0,90.000);

 

Na

Kód:

CreateDynamicObject(3461,-1966.837,296.396,36.102,0.0,0.0,0.0);

CreateDynamicObject(3461,-1966.916,291.694,35.993,0.0,0.0,0.0);

CreateDynamicObject(1284,-1991.331,290.408,36.379,0.0,0.0,90.000);

 

 

 

Tu máte INLUDE Y_Objects . http://uloz.to/727244/y-objects.inc" onclick="window.open(this.href);return false;

 

S pozdravem od AcrossCZ!

Link to comment
Share on other sites

  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

Autorem je Y_Less

 

Čaute,připravil jsem pro vás Y_Objects To je že můžete mít víc objektů než 150.Tento TUT vám pomůže mit objektů až 1 000 000 A bez padání serveru!.Takže prvni si stahněte INCLUDE Y_Objects,pak to vložte do složky v pawnu INCLUDE.

 

!VKLÁDEJTE!

 

Nahoru do módu

Kód:

#include

 

public OnGameModeInit()

Kód:

Object_Object();

 

public OnPlayerDisconnect(playerid, reason)

 

Kód:

Object_OnPlayerDisconnect( playerid, reason);

 

A nyní přejmenujeme Objecty:

 

Z

Kód:

CreateObject

na

Kód:

CreateDynamicObject

 

 

Takže např to bude takto z:

Kód:

CreateObject(3461,-1966.837,296.396,36.102,0.0,0.0,0.0);

CreateObject(3461,-1966.916,291.694,35.993,0.0,0.0,0.0);

CreateObject(1284,-1991.331,290.408,36.379,0.0,0.0,90.000);

 

Na

Kód:

CreateDynamicObject(3461,-1966.837,296.396,36.102,0.0,0.0,0.0);

CreateDynamicObject(3461,-1966.916,291.694,35.993,0.0,0.0,0.0);

CreateDynamicObject(1284,-1991.331,290.408,36.379,0.0,0.0,90.000);

 

 

 

Tu máte INLUDE Y_Objects . http://uloz.to/727244/y-objects.inc" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;

 

S pozdravem od AcrossCZ!

Divny, dám to http://uloz.to/727244/y-objects.inc" onclick="window.open(this.href);return false; vijede mi naky textovy blog asi v ruštině, co to je?? jinak plz jiny odkaz

//edit : už sem to spravil, udělal, ale vijelo mi 26 errorů

Link to comment
Share on other sites

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2116) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2148) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2180) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2212) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2243) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2274) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2305) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(2339) : warning 219: local variable "object" shadows a variable at a preceding level

D:\Moje věci\sa mp\pawno\include\YSI/Visual/YSI_objects.own(3222) : warning 219: local variable "object" shadows a variable at a preceding level

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

9 Warnings.

Link to comment
Share on other sites

Ano romi,mas velkou pravdu....ale tehle YSI je nejpouzivanejsi v pawnu.Ale zatiznejsi pouzivanni a upravovani je slozitejnsi.Mava je lepsi a lip upravitrlnejsi a jednoduchy ;)

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Mám problém... Tady jsou Warningy...

 

 

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1320) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1320) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1320) : warning 219: local variable "Z" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1350) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1350) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1350) : warning 219: local variable "Z" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1387) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1387) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1387) : warning 219: local variable "Z" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1425) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1425) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(1425) : warning 219: local variable "Z" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2520) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2520) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2520) : warning 219: local variable "Z" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2599) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2599) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2599) : warning 219: local variable "Z" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2743) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2743) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2743) : warning 219: local variable "Z" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2786) : warning 219: local variable "X" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2786) : warning 219: local variable "Y" shadows a variable at a preceding level

C:\Documents and Settings\Owner\Dokumenty\David\pawno\include\YSI/Visual/YSI_objects.own(2786) : warning 219: local variable "Z" shadows a variable at a preceding level

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

Header size: 3544 bytes

Code size: 157248 bytes

Data size: 1580084 bytes

Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion

Total requirements: 1757260 bytes

 

24 Warnings.

 

A zde řádky od 1320

 

SendClientMessage(playerid,COLOR_GREEN,"Ochrankou letište se můžete stát v Las Venturas u vratnice k letišti.");

SendClientMessage(playerid,COLOR_GREEN,"Z názvu povolání lehce odvodíte že ochranka má za úkol chránit. Konkrétně letiště.");

SendClientMessage(playerid,COLOR_GREEN,"Nežádoucí návštěvníky může ihned usmrtit.");

return 1;

}

if(strcmp(cmdtext,"/krupier",true)== 0){

SendClientMessage(playerid,COLOR_GREEN,"Krupiérem se můžete stát před casinem Caligula. Vaší naplní prace je pracovat v casinu");

SendClientMessage(playerid,COLOR_GREEN,"jako krupiér a zároven casino hlídat tělem i duší. Pokud se v casinu vyskytne problém");

SendClientMessage(playerid,COLOR_GREEN,"a mo ho navědomí nějaký z hráčů. Krupiér ho může usmrtit");

return 1;

}

if(strcmp(cmdtext,"/pravnik",true)== 0){

SendClientMessage(playerid,COLOR_GREEN,"Pravnikem se můžete stát v Las Venturas blízko u obchodu SEVEN 24-7");

SendClientMessage(playerid,COLOR_GREEN,"Právník má za úkol hajit hráče před Policii. Určitě znáte z běžného života.");

return 1;

}

 

 

 

 

if(strcmp(cmdtext, "/vyhod", true) == 0)

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_RED, "[POUŽITÍ] /vyhod [iD]");

return 1;

}

giveplayerid = strval(tmp);

if (IsPlayerConnected(giveplayerid))

{

GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

RemovePlayerFromVehicle(giveplayerid);

format(string, sizeof(string),"%s vas vykopnul z vozidla",sendername);

SendClientMessage(giveplayerid, COLOR_RED, string);

format(string, sizeof(string),"Vykopl jste hrace %s z vozidla",giveplayer);

SendClientMessage(playerid, COLOR_ORANGE, string);

format(string, sizeof(string),"Hrac %s vykopnul hrace %s z vozidla",sendername,giveplayer);

SendClientMessageToAll(COLOR_ORANGE,string);

}

else

{

format(string, sizeof(string), "ID:%d Neexistuje ! ", giveplayerid);

SendClientMessage(playerid, COLOR_RED, string);

}

return 1;

}

 

//-----------ZBRANĚ----------

if(strcmp(cmdtext, "/sniper", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi SNIPER"); //posle text hracovy

GivePlayerMoney(playerid,-20000); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,34,50);

return 1;

}

 

if(strcmp(cmdtext, "/m4", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi M4"); //posle text hracovy

GivePlayerMoney(playerid,-7000); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,31,5000);

return 1;

}

 

if(strcmp(cmdtext, "/brokovnice", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi UPILOVANOU BROKOVNICI"); //posle text hracovy

GivePlayerMoney(playerid,-7000); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,26,5000);

return 1;

}

 

if(strcmp(cmdtext, "/uzi", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi UZI"); //posle text hracovy

GivePlayerMoney(playerid,-2000); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,28,5000);

return 1;

}

 

if(strcmp(cmdtext, "/rifle", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi RIFLE"); //posle text hracovy

GivePlayerMoney(playerid,-1000); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,33,50);

return 1;

}

 

if(strcmp(cmdtext, "/eagle", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi DESERT EAGLE"); //posle text hracovy

GivePlayerMoney(playerid,-1000); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,24,500);

return 1;

}

 

if(strcmp(cmdtext, "/silenced", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi SILENCED"); //posle text hracovy

GivePlayerMoney(playerid,-2000); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,23,500);

return 1;

}

 

if(strcmp(cmdtext, "/padak", true) == 0) {

SendClientMessage(playerid, COLOR_LIGHTBLUE, "Koupil jsi PADÁK"); //posle text hracovy

GivePlayerMoney(playerid,-200); //ubere mu 2000 z jeho hotovosti

GivePlayerWeapon(playerid,46,500);

return 1;

}

 

řádky 2500 tam ani memám. :d Tak pls poradte :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...