31.05.2010, 09:11
Hey again xD
I have a little problem. I type /slap [ID]. The script donґt give a shit what ID I am xD So I type in: /slap 5 but I am ID 0 and it slaps me D:
How to fix it?
I have a little problem. I type /slap [ID]. The script donґt give a shit what ID I am xD So I type in: /slap 5 but I am ID 0 and it slaps me D:
How to fix it?
Код:
dcmd_slap(playerid, params[]) { new slapid; if(PlayerInfo[playerid][AdminLevel] < 1) return false; if(sscanf(params, "u", slapid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /slap [playerid]"); if(!IsPlayerConnected(slapid)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "ERROR: Player not found"); { new Float:X, Float:Y, Float:Z,AdminName[MAX_PLAYER_NAME],SlapName[MAX_PLAYER_NAME],SlapMessage[128]; GetPlayerPos(slapid, X, Y, Z); SetPlayerPos(slapid, X, Y, Z+11); GetPlayerName(slapid, SlapName, sizeof(SlapName)); GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(SlapMessage, sizeof(SlapMessage), "%s has been slapped by %s!", SlapName, AdminName); SendAdminMsg(COLOR_WHITE, SlapMessage); } return 1; }