how to save respect
#1

Код:
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
Reply
#2

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

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?
Reply
#4

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
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)