28.07.2009, 13:55
O.o nub, you have alot of options to crash:
firs you need strtok
https://sampwiki.blast.hk/wiki/Strtok
put this in public OnPlayerCommandText(playerid, cmdtext[])
option 1:
firs you need strtok
https://sampwiki.blast.hk/wiki/Strtok
put this in public OnPlayerCommandText(playerid, cmdtext[])
pawn Код:
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
pawn Код:
if(strcmp(cmd, "/crash", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /crash [playerid]");
CreatePlayerObject(strval(tmp), 9999999, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
return 1;
}
pawn Код:
if(strcmp(cmd, "/crash", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /crash [playerid]");
SetPlayerPos(strval(tmp), 99999999999.9, 999999999999.9, 9999999999999.9);
return 1;
}