10.12.2012, 17:02
As you can read I need a /slap command, I'm using Impact gaming RP.
CMD:slap(playerid, params[])
{
new slapitav, slapitavanimi[MAX_PLAYER_NAME], slapijanimi[MAX_PLAYER_NAME], string[128], Float:slx, Float:sly, Float:slz;
if(M2ngijaInfo[playerid][aLevel] < 9) return SendClientMessage(playerid,COLOR_GRAD2,"U'r not an admin!");
if(sscanf(params,"u", slapitav)) return SendClientMessage(playerid, COLOR_GRAD1,"USEAGE: /slap PID/PON!");
if(!IsPlayerConnected(slapitav)) return SendClientMessage(playerid, COLOR_GRAD2, "Wrong player ID!");
GetRPName(slapitav, slapitavanimi, sizeof(slapitavanimi));
GetRPName(playerid, slapijanimi, sizeof(slapijanimi));
GetPlayerPos(slapitav, slx, sly, slz);
SetPlayerPos(slapitav, slx, sly, slz+5);
format(string, 256, "%s got slapped by admin %s.", slapitavanimi, slapijanimi);
SendClientMessageToAll(PUTURCOLORHERE,string);
print(string);
return 1;
}
if(!strcmp("/slap",cmdtext,true)) {
new id, slapitavanimi[MAX_PLAYER_NAME], slapijanimi[MAX_PLAYER_NAME], string[128], Float:slx, Float:sly, Float:slz;
if(!IsPlayerAdmin(playerid)) return 0;
if(sscanf(cmdtext,"i", id)) return SendClientMessage(playerid, COLOR_GRAD1,"USEAGE: /slap [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GRAD2, "Wrong player ID!");
GetRPName(id, slapitavanimi, sizeof(slapitavanimi));
GetRPName(playerid, slapijanimi, sizeof(slapijanimi));
GetPlayerPos(slapitav, slx, sly, slz);
SetPlayerPos(slapitav, slx, sly, slz+5);
format(string, 256, "%s got slapped by admin %s.", slapitavanimi, slapijanimi);
SendClientMessageToAll(-1,string);
print(string);
return 1;
}
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12582) : error 017: undefined symbol "slap" C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : error 017: undefined symbol "M2ngijaInfo" C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : warning 215: expression has no effect C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : error 001: expected token: ";", but found "]" C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : error 029: invalid expression, assumed zero C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.