10.07.2010, 12:59
Код:
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; }
greeting