31.01.2016, 09:57
Hi all, trying to make an aunjail command, however I have 1 warning. All the research I have done says stuff to do with vehicles, yet this command doesn't do anything with vehicles.
Here is code
Warning is
Line of code is
Please help me. I will of course + Rep.
Here is code
PHP код:
CMD:aunjail(playerid, params[])
{
new giveplayerid, giveplayer[25], playername[25];
if (adlvl[playerid] < 3) return 0;
if (sscanf(params, "u", giveplayerid)) return SendClientMessage2(playerid, COLOR_ORANGE, "Usage: /aunjail [playerid]");
if (!IsPlayerConnected2(giveplayerid)) return SendClientMessage2(playerid, COLOR_RED, "Error: Inactive player id!");
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
if (jailedtime[giveplayerid] == 0) return SendPlayerFormattedText(playerid, COLOR_RED, "Error: %s isn't in jail!", giveplayer, "");
jailedtime[giveplayerid] = 0;
dini_Unset(AddDirFile(dir_userfiles, giveplayer), "jailtime");
dini_Unset(AddDirFile(dir_userfiles, giveplayer), "jailloc");
SetPlayerInterior(giveplayerid, 0);
SetPlayerVirtualWorld2(giveplayerid, 0);
SetPlayerPos(giveplayerid, wspawns[dspawn[giveplayerid]][0], wspawns[dspawn[giveplayerid]][1], wspawns[dspawn[giveplayerid]][2] + 1.0);
SetPlayerFacingAngle(giveplayerid, wspawns[dspawn[giveplayerid]][3]);
SetCameraBehindPlayer(giveplayerid);
TogglePlayerControllable(giveplayerid, 1);
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
SendAllFormattedText(COLOR_YELLOW, "%s has been unjailed early by Admin.", giveplayer);
printf("[unjail] %s has been unjailed early by Admin.", giveplayer);
return 1;
}
Код:
E:\All Folders\Hobbies\Server Hosting\SA-MP\_RNT Gaming\gamemodes\RNTG.pwn(22895) : warning 202: number of arguments does not match definition
PHP код:
printf("[unjail] %s has been unjailed early by Admin.", giveplayer);