Help!
#3

At first playerid is not a string. Check your second format and change %s to %i.

Edit: Try this:

pawn Код:
dcmd_sendtoadmh(playerid, params[])
{
    new targetid, pName[MAX_PLAYER_NAME],Playername[MAX_PLAYER_NAME];
    if(sscanf(params, "i", targetid)) return SendClientMessage, COLOR_RED, "/sendtoadmh [playerid]");
    {
        if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You have no access to this command");
        {
            if(targetid == INVALID_PLAYER_ID || IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Player Not Found");
            {
                GetPlayerName(targetid, pName, MAX_PLAYER_NAME);
                GetPlayerName(playerid, Playername, MAX_PLAYER_NAME);
                SetPlayerPos(targetid, -2329.9060058594, -1619.1413574219, 489.66583251953);
                format(string, 128, "You transfered %s (ID: %i) to Admin's House", pName, targetid);
                format(msg, 128, "You got transfered to Admin's House by Admin %s", Playername, playerid);
                SendClientMessage(playerid, COLOR_LIGHTBULE, string);
                SendClientMessage(targetid, COLOR_LIGHTBLUE, msg);
                return 1;
            }
        }
    }
}
Reply


Messages In This Thread
Help! - by Rivera - 15.03.2011, 16:10
Re: Help! - by boelie - 15.03.2011, 16:23
Re: Help! - by Jochemd - 15.03.2011, 16:41
Re: Help! - by Rivera - 15.03.2011, 19:36
Re: Help! - by Jochemd - 15.03.2011, 19:41
Re: Help! - by Marricio - 15.03.2011, 19:44
Re: Help! - by Rivera - 15.03.2011, 19:44
Re: Help! - by Jochemd - 15.03.2011, 19:46
Re: Help! - by boelie - 15.03.2011, 19:47
Re: Help! - by Marricio - 15.03.2011, 19:49

Forum Jump:


Users browsing this thread: 6 Guest(s)