hello need help with saving in dini (command)
#1

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;
}
Reply
#2

Please some one answer this question + reputation!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)