Quote:
Originally Posted by JeNkStAX
Just a quick bit of code, Might need editing
You need to find a way to save it yourself
Replace color with a color of your choice
pawn Код:
// Top of script new Level[MAX_PLAYERS]; new UpgradePoints[MAX_PLAYERS]; forward PayDay();
// OnGameModeInit SetTimer("PayDay", 3600000, 1);// 1 Hour
// OnPlayerCommandText if(strcmp(cmdtext, "/time", true) == 0) { new min,sec,hr; new string[100]; gettime(hr,min,sec); format(string, sizeof(string), "The time is %d:%d", hr,min); SendClientMessage(playerid, color, string); return 1; } if(strcmp(cmdtext, "/levelup", true) == 0) { if(UpgradePoints[playerid] >= Level[playerid]+4) { SendClientMessage(playerid, color, "You have successfully Level'd Up"); Level[playerid]++; SetPlayerScore(playerid, Level[playerid]); UpgradePoints[playerid] = UpgradePoints[playerid]-Level[playerid]+4; return 1; } else { SendClientMessage(playerid, color, "You dont have enough Upgrade Points"); return 1; } return 1; }
// Anywhere in your script apart from in another function public PayDay() { for(new i; i < MAX_PLAYERS; i++) { SendClientMessage(i, color, "Its Payday"); // Your code here, Use i for playerid // For your levels UpgradePoints[i]++; if(UpgradePoints[i] >= Level[i]+4) { SendClientMessage(i, color, "You are eligiable for a Level Up (( /levelup ))"); } } return 1; }
|
Tnx, and if you could give the command /level where it shows experience levels, what level i am...
And +i need some script for gangs to be able to take a gangzone, i made gangzone, its colored in the map in the game, and i just need script where it can be taken from other gang, here are cords of gangzone
BALLAS = GangZoneCreate(1600.147, -1942.413, 2060.291, -1425.259);
GROVE = GangZoneCreate(1957.614, -1883.197, 2497.617, -1551.586);
VAGOS = GangZoneCreate(2204.798, -1598.959, 2687.759, -1148.917);