View Single Post
Old 04/06/2012, 09:36 PM   #2
Sandiel
Huge Clucker
 
Sandiel's Avatar
 
Join Date: May 2012
Location: SA-MP Forums. Pawn Level: Master. Occupation: Scripter.
Posts: 384
Reputation: 45
Default Re: unjail only for ID 0 problem.

For this you will be needing ZCMD, and sscanf. ZCMD is far more better than strcmp, seriously.
pawn Code:
COMMAND:unjail(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new targetid;
        if(!sscanf(params, "u", targetid))
        {
            if(IsPlayerConnected(targetid))
            {
                if(IsPlayerInRangeOfPoint(targetid, 3, jailX, jailY, jailZ))
                {
                    SetPlayerPos(targetid, somewhereX, somewhereY, somewhereZ);
                    new pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME], str[128];
                    GetPlayerName(playerid, aName, sizeof(aName));
                    GetPlayerName(targetid, pName, sizeof(pName));
                    format(str, sizeof(str), "AdmCmd: %s has been released by %s from his jail time", pName, aName);
                    SendClientMessageToAll(COLOR_RED, str);
                }
            }
        }
    }
    return 1;
}
__________________
My work:
[FS]New unique DJ Job, suitable for everyone[UPDATED]
[FS]SmartChecker System v1.3[UPDATED]
WILL CODE FOR LEAGUE OF LEGENDS SKINS.


All of the work made by SandieL is registered and fully licensed by Creative Common, this work is copyrighted
Sandiel is offline   Reply With Quote