[Include] [INC] Rank/Level System [Version 2.0]
#41

This is my OnPlayerCommand:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/rankinfo", true) == 0)
{
  GetRankInfo(playerid);
  return 1;
}

if(strcmp(cmdtext, "/mystats", true) == 0)
{
  GetPlayerStats(playerid);
  return 1;
}
	return 0;
}
But when I save, I get this error:
Код:
C:\Programmi\Rockstar Games\GTA San Andreas\SAMP\gamemodes\cajaksecondo.pwn(495) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Why ?
Reply
#42

Hey sandra i love this rank system but can you post a version without the spawn weapons/ammo and health/armour , because i dont like it, i prefer the players have three weapons when they spawn depending the character they have chossed.
I have a server that each character spawns with three weapons, for each PJ the weapons are different so the spawn weapns ammo fuck my sv.
Please help me...
Reply
#43

Quote:
Originally Posted by =>Sandra<=
Quote:
Originally Posted by Rikker
I didnt see that command but "Players can only promote with SetPlayerRank(playerid, rankID);" and i didnt have from where to add the command so i whas thinking that its in the .inc (now i know thats its not)

//Rikker
SetPlayerRank is a function, not a command.
You have to make that yourself
i am a big noob, so would it just be

if(strcmp(cmd, "/setrank", true) == 0){
SetPlayerRank(playerid, rankID);
return 1;
}
Reply
#44

Sandra You're the best!
Reply
#45

i cant do this ?


Код:
SetPromotionMode(1);
AddRank(1,"Level 1" , 0, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 2" , 1, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 3" , 2, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 4" , 3, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 5" , 4, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 6" , 5, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 7" , 6, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 8" , 7, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 9" , 8, 0, 100.0, 0.0, 0, 0);
AddRank(1,"Level 10" , 9, 0, 100.0, 0.0, 0, 0);
cant i add same promotion mode like this ?

if he plays 1 hour he is lvl 2..if he plays 3 hourz he is lvl 3 ...
Reply
#46

how to make it work nvm :
i will find other one :/
Reply
#47

how to fix this...?sorry on my bad english....

C:\Documents and Settings\Administrator\Desktop\DEBUGGED_PEN1LS_UPD ATED\gamemodes\penls.pwn(2) : fatal error 100: cannot read from file: "Ranks"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#48

u didnt add the Ranks.inc in your /pawno/includes folder
Reply
#49

hey pls do a exemple FS...
Reply
#50

What i'm doing wrong ?

Quote:

public PlayerCheck(playerid)
{
for(new i=0;i<MAX_PLAYER;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
new vehicleid = GetPlayerVehicleID(i);
new exit=0;
new Float, Float:y, Float:z;
GetPlayerPos(i, x, y, z);
if(GetVehicleModel(vehicleid) == 432)
{
if(GetPlayerRank(playerid) == 3)
{
GameTextForPlayer(i, "~w~Rank: ~b~Private 2st Class~r~ needed~w~!", 2000, 3);
denied = 1;
}
}
if(exit == 1)
{
SetPlayerPos(i, x, y, z+1);
RemovePlayerFromVehicle(i);
}
}
}
}
return 1;
}

Reply
#51

Код:
warning 203: symbol is never used: "strtok"
and when i run server it crashes :S
Reply
#52

Quote:
Originally Posted by ? ???????
What i'm doing wrong ?

Quote:

public PlayerCheck(playerid)
{
for(new i=0;i<MAX_PLAYER;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
new vehicleid = GetPlayerVehicleID(i);
new exit=0;
new Float, Float:y, Float:z;
GetPlayerPos(i, x, y, z);
if(GetVehicleModel(vehicleid) == 432)
{
if(GetPlayerRank(playerid) == 3)
{
GameTextForPlayer(i, "~w~Rank: ~b~Private 2st Class~r~ needed~w~!", 2000, 3);
denied = 1;
}
}
if(exit == 1)
{
SetPlayerPos(i, x, y, z+1);
RemovePlayerFromVehicle(i);
}
}
}
}
return 1;
}

u made only lvl 3 class can't get in the vehicle and all others can if(GetPlayerRank(playerid) == 3)
________
Zoloft side effect
Reply
#53

can somebody send me a working one because It dont work for meh
Reply
#54

Please help i have a problem is:

When player join to server server is shut down!

Please help
Reply
#55

Everything work perfect. Thanks for sharing.
Reply
#56

Great Script, very useful.
Reply
#57

is that posible?
Quote:

public OnGameModeInit()
{
SetPromotionMode(1);
AddRank(0, "New", 0, 0, 100.0, 0, 23, 300);
AddRank(1, "Survivor", 1, 5, 100.0, 25.0, 25, 50);
AddRank(2, "Professional Survivor", 15, 5, 100.0, 50.0, 30, 90);
AddRank(3, "Untouchbal", 15, 30, 100.0, 100.0, 25, 80);
AddRank(4, "local player", 30, 200, 100.0, 100.0, 30, 500);
AddRank(5, "king player", 70, 600, 100.0, 100.0, 27, 250);
AddRank(6, "player LOCO !!!!", 150, 7000, 100.0, 100.0,24, 550);

SetPromotionMode(2);
AddRank(0, "New", 0, 0, 100.0, 0, 23, 300);
AddRank(1, "babykilla", 5, 0, 100.0, 25.0, 25, 50);
AddRank(2, "killa", 15, 5, 100.0, 50.0, 30, 90);
AddRank(3, "slayer", 15, 30, 100.0, 100.0, 25, 80);
AddRank(4, "mafiosyy", 30, 200, 100.0, 100.0, 30, 500);
AddRank(5, "waw", 70, 600, 100.0, 100.0, 27, 250);
AddRank(6, "LOCO!", 150, 7000, 100.0, 100.0,24, 550);
}
Reply
#58

with "Promotionmode 5 = Players will promote depending on their score", how would the player receive scores??
Reply
#59

What about if i want a player to promote if he plays in the server
for 5mins??

i know promotion mode 1

but requirements??
please help
Reply
#60

Quote:
Originally Posted by Kyro
Посмотреть сообщение
What about if i want a player to promote if he plays in the server
for 5mins??

i know promotion mode 1

but requirements??
please help
You could modify the include in such way it will give him a reward/rank up every five min.

PHP код:
1 minute 0.0166666667 hour 
so you would use

pawn Код:
floatround( 5 * 0.0166666667 );
.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)