Slap command returns an Unknown Command when player is not connected
#11

I not a user of ycmd, but try this:

pawn Код:
YCMD:slap(playerid, params[], help)
{
    #pragma unused help
    new vName[MAX_PLAYER_NAME];
    new pName[MAX_PLAYER_NAME];
    new Float:x, Float:y, Float:z;
    new string[128];
    GetPlayerName(playerid,pName, 32);
    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
    {
        new rplayer;
        if(sscanf(params, "i", rplayer)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage: /slap [playerid]");
        if(!IsPlayerConnected(rplayer)) return SendClientMessage(playerid, COLOR_ORANGE, "Player not connected");
        GetPlayerName(rplayer,vName, 32);
        format(string, sizeof(string), "%s has slapped %s",pName,vName); // Defining string
        SendClientMessageToAll(COLOR_ORANGE, string);
        GetPlayerPos(playerid, x,y,z);
        SetPlayerPos(playerid,x,y,z+15);
    }
    else SendClientMessage(playerid, COLOR_ORANGE,"You are not a high enough level to use this command !");
    return 1;
}
Reply


Messages In This Thread
Login Issue - by HydraX - 31.07.2011, 04:42
Re: Slap command returns an Unknown Command when player is not connected - by [HiC]TheKiller - 31.07.2011, 04:51
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 31.07.2011, 04:55
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 31.07.2011, 05:00
Re: Slap command returns an Unknown Command when player is not connected - by Runedog48 - 31.07.2011, 05:01
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 31.07.2011, 05:04
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 31.07.2011, 05:11
Re: Slap command returns an Unknown Command when player is not connected - by Jack_Leslie - 31.07.2011, 05:34
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 31.07.2011, 17:25
Re: Slap command returns an Unknown Command when player is not connected - by Toreno - 31.07.2011, 17:49
Re: Slap command returns an Unknown Command when player is not connected - by iPLEOMAX - 31.07.2011, 17:57
Re: Slap command returns an Unknown Command when player is not connected - by Toreno - 31.07.2011, 18:20
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 31.07.2011, 20:08
Re: Slap command returns an Unknown Command when player is not connected - by Toreno - 31.07.2011, 20:56
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 01.08.2011, 02:28
Re: Slap command returns an Unknown Command when player is not connected - by Toreno - 01.08.2011, 04:59
Re: Slap command returns an Unknown Command when player is not connected - by HydraX - 01.08.2011, 05:19

Forum Jump:


Users browsing this thread: 2 Guest(s)