24.11.2009, 12:51
What do i need to add to my Script? - To crash another players.. like /adcrash[id]
Admin LVL 1337
Admin LVL 1337
Originally Posted by dice7
|
dcmd_crash(playerid,params[]) { if(sPlayerAdmin(playerid)) { if(!strlen(params)) return SendClientMessage(playerid, red, " USAGE: /crash [playerid]"); new player1 = strval(params), string[128], Float:X,Float:Y,Float:Z; if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { GetPlayerPos(player1,X,Y,Z); CreatePlayerObject(player1,385,X,Y,Z,0,0,0); format(string, sizeof(string), " You have crash player %s", pName(player1)); return SendClientMessage(playerid,COLOR_RED, string); } else return SendClientMessage(playerid,red," ERROR: There is no such player"); } else return SendClientMessage(playerid,red," ERROR: You must be an admin to use this command"); } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(crash,5,cmdtext); return 0; }