Ranks - 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)
+--- Thread: Ranks (
/showthread.php?tid=279692)
Ranks -
Trucker[UK] - 28.08.2011
Hello
Does anyone know how to make Trucking ranks that go by score please help
Re: Ranks -
[MWR]Blood - 28.08.2011
Make a variable for the rank, then make a public callback that updates the rank, get the player score, and set a timer that calls that callback.
Re: Ranks -
Trucker[UK] - 28.08.2011
can u show me an example
Re: Ranks -
Kitten - 28.08.2011
pawn Код:
new Ranks[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Ranks[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid)
{
Ranks[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerScore(killerid) == 1) {
SendClientMessage(killerid,-1,"SERVER: You just ranked up to 1 :D");
Ranks[killerid] = 1;
}
return 1;
}
// now try to make something if player is rank 1
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/weaponrank1", cmdtext, true, 10) == 0) {
if(Ranks[playerid] == 1) {
GivePlayerWeapon(playerid,24,1000);
}
else {
SendClientMessage(playerid,-1,"SERVER: You are not rank 1 :)");
}
return 1;
}
return 0;
}
Re: Ranks -
Trucker[UK] - 29.08.2011
no like this
Red indicates rank
Trucker Wannabe is first rank