SA-MP Forums Archive
hello need help with saving in dini (command) - 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: hello need help with saving in dini (command) (/showthread.php?tid=313261)



hello need help with saving in dini (command) - trapped1 - 25.01.2012

So the thing is every hour player can give to player 1 respect point.

Problem is: How to save it in dini?

Код:
dcmd_respect(playerid,params[]) //i dont use dcmd...so this would have to be fixed by you if it's wrong
{
	if(CanUseCmd[playerid] == true)
    {
        new id;
        if(sscanf(params, "r", id)) return SendClientMessage(playerid, 0xCC0000AA, "USAGE: /respect <playerid/partofname>");
        if(gTeam[playerid] == TEAM_GSF) //I'm not sure if you use this or not, however you get their teams, check if they're equal
        {
            SetPlayerScore(id, GetPlayerScore(id)+1); //we set our targets score +1 their current score
            RestrictTime[playerid] = SetTimer("RestrictionOver", 3_600_000, false); //create our timer
            CanUseCmd[playerid] = false; //make it so they can't use this cmd for now
        }else return SendClientMessage(playerid, 0xCC0000AA, "This player isn't part of your team!"); //if they aren't the same team error msg
    }else return SendClientMessage(playerid, 0xCC0000AA, "You can't use this command yet You need to wait 1 hour to use it again!"); //if they can't use it yet send an error msg
	return 1;
}



Re: hello need help with saving in dini (command) - trapped1 - 25.01.2012

Please some one answer this question + reputation!