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

pawn Code:
if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
    {
        if(sscanf(params, "i", playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage: /slap [playerid]"); // Checking is the player just typed /slap now e.g. /slap 0 10
        if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "Player is not connected");
            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);
            return 1;
    }
But I think you need to make a "giveplayerid" and make it so "giveplayerid" is the playerid that gets slapped? Otherwise the script is going to confuse it's self..
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: 3 Guest(s)