Adding 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Adding Ranks? (
/showthread.php?tid=105656)
Adding Ranks? -
Tigerbeast11 - 30.10.2009
Is it possible to add ranks? Like when the player gets 15 kills, he gets the tag [SUPER] added to his name and if he gets 30 then he gets [AWESOME] added to his name.
I know its possible, but how? What is the concepT?
Re: Adding Ranks? -
TraNe15 - 30.10.2009
Код:
if (strcmp("/myrank", cmdtext, true, 10) == 0)
{
new PName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PName,MAX_PLAYER_NAME);
if(GetPlayerScore(playerid) <= 100) {
SetPlayerName(playerid,"%s[GOOD]",PName);
}
if(100 < GetPlayerScore(playerid) <= 200) {
SetPlayerName(playerid,"%s[AWESOME]",PName);
}
if(200 < GetPlayerScore(playerid) <= 500) {
SetPlayerName(playerid,"%s[UNSTOPPABLE]",PName);
}
if(500 < GetPlayerScore(playerid) <= 750) {
SetPlayerName(playerid,"%s[HOLYSHIT]",PName);
}
if(750 < GetPlayerScore(playerid)) {
SetPlayerName(playerid,"%s[GODLIKE]",PName);
}
return 1;
}
Special Thanks to "
www.gtaturk.com "
This should work.. Please test it and let me know the resuts..
-TraNe15-
Re: Adding Ranks? -
Nyafe - 31.10.2009
Код:
if (strcmp("/myrank", cmdtext, true, 10) == 0)
{
if(GetPlayerScore(playerid) <= 100) {
SetPlayerName(playerid,"%s[GOOD]", playername);
}
if(100 < GetPlayerScore(playerid) <= 200) {
SetPlayerName(playerid,"%s[AWESOME]", playername);
}
if(200 < GetPlayerScore(playerid) <= 500) {
SetPlayerName(playerid,"%s[UNSTOPPABLE]", playername);
}
if(500 < GetPlayerScore(playerid) <= 750) {
SetPlayerName(playerid,"%s[HOLYSHIT]", playername);
}
if(750 < GetPlayerScore(playerid)) {
SetPlayerName(playerid,"%s[GODLIKE]", playername);
}
return 1;
}
ERRORS:
C:\Documents and Settings\Administrator\Desktop\[GM] Public Enemy_LS\gamemodes\pencr.pwn(11887) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\[GM] Public Enemy_LS\gamemodes\pencr.pwn(11890) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\[GM] Public Enemy_LS\gamemodes\pencr.pwn(11893) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\[GM] Public Enemy_LS\gamemodes\pencr.pwn(11896) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\[GM] Public Enemy_LS\gamemodes\pencr.pwn(11899) : warning 202: number of arguments does not match definition
Re: Adding Ranks? -
Tigerbeast11 - 31.10.2009
And one more thing, I want it to check the
kills!,
not the score!!!!!!!
But nice try anyway!
Re: Adding Ranks? -
Zeromanster - 31.10.2009
Quote:
Originally Posted by Tigerbeast11
And one more thing, I want it to check the kills!, not the score!!!!!!!
But nice try anyway!
|
Just make that the player gets +1 score when he kills somebody.
Re: Adding Ranks? -
Tigerbeast11 - 31.10.2009
For some reason, it makes my pawno and my server laggy :S