Help with zcmd
#2

pawn Код:
CMD:slap(playerid, params[])
{
    if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command ");
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "[SYNTAX]: /slap [PlayerID/PartOfName]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_ERROR, "[ERROR]: Player not connected!");
    else
    {
    new Float:SLX, Float:SLY, Float:SLZ;
    GetPlayerPos(targetid, SLX, SLY, SLZ);
    SetPlayerPos(targetid, SLX, SLY, SLZ+5);
    PlayerPlaySound(targetid, 1130, SLX, SLY, SLZ+5);
    new string[128];
    new pName[24], pTame[24];
    GetPlayerName(playerid,pName,24);
    GetPlayerName(targetid,pTame,24);
    format(string,sizeof string,""#COL_YELLOW"[SERVER]"#COL_LRED" %s has been slapped by Administrator %s.",pTame,pName);
    SendClientMessageToAll(COLOR_RED, string);
    }
    return 1;
}

The others should work.. Make sure you compile the script. **Laugh**
Reply


Messages In This Thread
Help with zcmd - by Benzke - 18.08.2012, 08:23
Re : Help with zcmd - by ricardo178 - 18.08.2012, 08:30
Re: Help with zcmd - by Benzke - 18.08.2012, 08:31
Re : Help with zcmd - by ricardo178 - 18.08.2012, 09:20
Re: Help with zcmd - by gtakillerIV - 19.08.2012, 22:30
Re: Help with zcmd - by Shetch - 20.08.2012, 00:56

Forum Jump:


Users browsing this thread: 2 Guest(s)