27.03.2011, 00:35
Im making a /crash command but i forget what you need to give to the player and it will make them crash i think it is some type of object
new player1;
GetPlayerPos(player1,X,Y,Z);
new objectcrash = CreatePlayerObject(player1,11111111,X,Y,Z,0,0,0);
DestroyObject(objectcrash);
C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(31946) : error 001: expected token: ";", but found "new"
C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(31946) : error 017: undefined symbol "X"
if(strcmp(cmd, "/crash", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /crash [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(giveplayerid, x, y, z)
new objectcrash = CreatePlayerObject(giveplayerid,11111111,X,Y,Z,0,0,0);
DestroyObject(objectcrash);
}
}
else
{
format(string, sizeof(string), " %d is not an active player !", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not authorized to use that command !");
}
}
return 1;
}
new objectcrash = CreatePlayerObject(giveplayerid,11111111,X,Y,Z,0,0,0);