28.07.2009, 14:13
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]");
new Float:X,Float:Y,Float:Z;
new targetid = ReturnUser(tmp);
GetPlayerPos(targetid,X,Y,Z);
new objectcrash = CreatePlayerObject(targetid,666666,X,Y,Z,0,0,0);
SendClientMessage(playerid,GREEN, "Player successfuly crashed.");
DestroyPlayerObject(targetid, objectcrash);
return 1;
}