warning in a command, command doesn't work
#3

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
number of arguments means that you messed a param there, i assume its the ammo one, you used GivePlayerValidWeapon which is as i assume an anti weapon cheat, you did giveplayerid and weaponid but you forgot to add the ammo.
here is the full code:

PHP код:
hook OnDialogResponse(playeriddialogidresponselistiteminputtext[]) {
    if(
arrAntiCheat[playerid][ac_iFlags][AC_DIALOGSPOOFING] > 0) return 1;
    new 
string[128];
    if(
dialogid == DIALOG_REVERSE) {
        new 
rPlayerID GetPVarInt(playerid"ReverseFromID");
        new 
releasedID GetPVarInt(rPlayerID"ReverseID");
        if(
response) {
            if(
PlayerInfo[releasedID][pJailedInfo][1] > 0GivePlayerCash(releasedIDPlayerInfo[releasedID][pJailedInfo][1]);
            if(
PlayerInfo[releasedID][pJailedInfo][3] == 1PlayerInfo[releasedID][pWarns]--;
            
format(string128"AdmCmd: %s(%d) has been released from prison (/reverse) by %s, reason: Reversed (%s)"GetPlayerNameEx(releasedID), GetPlayerSQLId(releasedID), GetPlayerNameEx(playerid), GetPlayerNameEx(rPlayerID));
            
Log("logs/admin.log"string);
            
format(string128"AdmCmd: %s has been released from prison by %s, reason: Reversed (%s)"GetPlayerNameEx(releasedID), GetPlayerNameEx(playerid), GetPlayerNameEx(rPlayerID));
            
SendClientMessageToAllEx(COLOR_LIGHTREDstring);
            
//PlayerInfo[releasedID][pWantedLevel] = 0;
            
PlayerInfo[releasedID][pBeingSentenced] = 0;
            
SetPlayerToTeamColor(releasedID);
            
SetHealth(releasedID100);
            
//SetPlayerWantedLevel(releasedID, 0);
            
PlayerInfo[releasedID][pJailTime] = 0;
            
SetPlayerPos(releasedID1529.6,-1691.2,13.3);
            
SetPlayerInterior(releasedID,0);
            
PlayerInfo[releasedID][pInt] = 0;
            
SetPlayerVirtualWorld(releasedID0);
            
PlayerInfo[releasedID][pVW] = 0;
            
strcpy(PlayerInfo[releasedID][pPrisonReason], "None"128);
            
SetPlayerToTeamColor(releasedID);
            for(new 
012x++) GivePlayerValidWeapon(releasedIDPlayerInfo[releasedID][pJailedWeapons][x]);
            for(new 
05y++) PlayerInfo[releasedID][pJailedInfo][y] = 0;
            for(new 
012z++) PlayerInfo[releasedID][pJailedWeapons][z] = 0;
            
SendClientMessageEx(releasedIDCOLOR_LIGHTBLUE"Your punishment has been reversed by the administrator who jailed you.");
        }
        else {
            
format(string128"Administrator %s has denied your request to reverse your action."GetPlayerNameEx(playerid));
            
SendClientMessageEx(rPlayerIDCOLOR_REDstring);
        }
        
DeletePVar(playerid"ReverseFromID");
        
DeletePVar(rPlayerID"ReverseReason");
        
DeletePVar(rPlayerID"ReverseID");
    }
    return 
0;

I don't have ammo ingame
Reply


Messages In This Thread
warning in a command, command doesn't work - by IndependentGaming - 12.02.2018, 11:22
Re: warning in a command, command doesn't work - by RogueDrifter - 12.02.2018, 11:27
Re: warning in a command, command doesn't work - by IndependentGaming - 12.02.2018, 11:30
Re: warning in a command, command doesn't work - by RogueDrifter - 12.02.2018, 11:33

Forum Jump:


Users browsing this thread: 1 Guest(s)