SA-MP Forums Archive
[ZCMD]Setting Not work out - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [ZCMD]Setting Not work out (/showthread.php?tid=476065)



[ZCMD]Setting Not work out - donhu789 - 16.11.2013

pawn Код:
CMD:setkills(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 3)
    {
        new id,kill;
        if(sscanf(params, "ui", id, kill)) return
        SendClientMessage(playerid, 0xFFFF00C8, "Usage: /Setkills <PlayerID> <kills>") ;
        if(IsPlayerConnected(id))
        {
            format(Jstring, sizeof(Jstring), "Admin %s has set your kills to '%d'",GetName(playerid),kill);
            SendClientMessage(id,lighterblue,Jstring);
            format(Jstring,sizeof(Jstring),"You have set %s's kills to %d", GetName(id), kill);
            SendClientMessage(playerid,yellow,Jstring);
            return PlayerInfo[id][Kills] = kill;
        }
        else return SendClientMessage(playerid,lighterblue,"Player is NOT connected!");
    }
    else return SendClientMessage(playerid,lighterblue,"You Are Not High Enough Level");
}

CMD:setdeaths(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 3)
    {
        new id,dea;
        if(sscanf(params, "ui", id, dea)) return
        SendClientMessage(playerid, 0xFFFF00C8, "Usage: /Setdeaths <PlayerID> <Deaths>") ;
        if(IsPlayerConnected(id))
        {
            format(Jstring, sizeof(Jstring), "Admin %s has set your Deaths to '%d'",GetName(playerid),dea);
            SendClientMessage(id,lighterblue,Jstring);
            format(Jstring,sizeof(Jstring),"You have set %s's Deaths to %d", GetName(id), dea);
            SendClientMessage(playerid,yellow,Jstring);
            return PlayerInfo[id][Deaths] = dea;
        }
        else return SendClientMessage(playerid,lighterblue,"Player is NOT connected!");
    }
    else return SendClientMessage(playerid,lighterblue,"You Are Not High Enough Level");
}


Guys Please Help went i set player kill,Death Higher Is Worked Fine And If i /setdeath , /setkill to 0 is show the error :\ can anyone see my code and fix it


Re: [ZCMD]Setting Not work out - Konstantinos - 16.11.2013

Quote:
Originally Posted by donhu789
Посмотреть сообщение
Guys Please Help went i set player kill,Death Higher Is Worked Fine And If i /setdeath , /setkill to 0 is show the error :\ can anyone see my code and fix it
What error? That the player is not connected? If so, update sscanf.


AW: [ZCMD]Setting Not work out - Skimmer - 16.11.2013

Like Konstantinos said. It would be good if you explain us more infos about the bug.

I don't see any error in your script.


Re: [ZCMD]Setting Not work out - donhu789 - 16.11.2013

my final scanf went i set my self kill to 0 is work but is show unknown commands but is work setted :v