18.07.2012, 22:54
Hmm I see you're using Strcmp wrong for commands. Like you did here
I guess you meant to check if /edm is the same as cmdtext[]. Well I think you should've done it like this:
Otherwise when you enter anything with a / before it (e.g /blablabla) it will execute the /edm stuff.
Another thing I noticed in the /maps command
which might cause crashes because of the ~w. This should be fine:
Here is a fixed version of your code. By the way nice maps .
pawn Код:
if(strcmp(cmdtext,"/edm",true) )
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,28.1063, 2242.8928, 126.0000);
SetPlayerInterior(playerid,0);
GivePlayerWeapon(playerid,30,999999);
GameTextForPlayer(playerid,"Welcome to ~g~EEFS~N~ ~R~DeathMatch!",2500,3);
SetPlayerHealth (playerid, 100);
return 1;
}
pawn Код:
if(!strcmp(cmdtext,"/edm",true))
{
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,28.1063, 2242.8928, 126.0000);
SetPlayerInterior(playerid,0);
GivePlayerWeapon(playerid,30,999999);
GameTextForPlayer(playerid,"Welcome to ~g~EEFS~N~ ~R~DeathMatch!",2500,3);
SetPlayerHealth (playerid, 100);
return 1;
}
Another thing I noticed in the /maps command
pawn Код:
GameTextForPlayer(playerid,"~w Maps by 18240 ]/edm] ]/aarace] ]/bikestunt]",2500,3);
pawn Код:
GameTextForPlayer(playerid,"~w~ Maps by 18240 ]/edm] ]/aarace] ]/bikestunt]",2500,3);
Here is a fixed version of your code. By the way nice maps .