SA-MP Forums Archive
how to save respect - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to save respect (/showthread.php?tid=158577)



how to save respect - mariokumanovac - 10.07.2010

Код:
new RespectTimer[MAX_PLAYERS];
forward RespectUpdate(playerid);

public OnPlayerConnect(playerid)
{
 * * * *RespectTimer[playerid] = SetTimerEx("RespectUpdate", 60000 * 5, 1, "i", playerid);
 * * * *return 1;
}

public OnPlayerDisconnect(playerid)
{
 * * * *KillTimer(RespectTimer[playerid]);
 * * * *return 1;
}

public RespectUpdate(playerid)
{
 * * * *SetPVarInt(playerid, "p_Respect", GetPVarInt(playerid, "p_Respect")+1);
 * * * *return 1;
}

if(strcmp(cmdtext, "/buylevel", true, 12)) 
{
 * * * *if(GetPVarInt(playerid, "p_Respect") >= 10)
 * * * *{
 * * * * * * * *SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
 * * * * * * * *SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: You buyed now level.");
 * * * *}
 * * * *else
 * * * *{
 * * * * * * * *return SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Dont have respect to buy next level.");
 * * * *}
 * * * *return 1;
}
work thus respect and Level but I wonder how do I save time and respektite while to come a new respect so when you turn off the game and recently in January to run my timer continues where it stopped, levels should not Stores ...

greeting


Re: how to save respect - Lorenc_ - 10.07.2010

You might have to use Dini by dracoblue to save stuff. Its more simple.


Re: how to save respect - mariokumanovac - 10.07.2010

Quote:
Originally Posted by ((Lorenc))
Посмотреть сообщение
You might have to use Dini by dracoblue to save stuff. Its more simple.
I am a beginner and do not understand that if someone wants to make me and gave me the code?


Re: how to save respect - Lorenc_ - 10.07.2010

Ill try. May i PM you the code by tommrow?

EDIT: Ill put a register system with your code init ok!

EDIT2: There you go

http://forum.sa-mp.com/showthread.ph...t=score+saving

That could probally help you! All you need to do is just replace some things and you'll be alright. Damn why didnt i search.


-Lorenc


Re: how to save respect - mariokumanovac - 10.07.2010

Quote:
Originally Posted by ((Lorenc))
Посмотреть сообщение
Ill try. May i PM you the code by tommrow?

EDIT: Ill put a register system with your code init ok!

EDIT2: There you go

http://forum.sa-mp.com/showthread.ph...t=score+saving

That could probally help you! All you need to do is just replace some things and you'll be alright. Damn why didnt i search.


-Lorenc
I can not understand it please script it you'll be very grateful.