19.03.2016, 01:19
Hello guys.
Today, I've started a new RPG gamemode, but I have 2 weird issues that I've never had before.
1.When I create a command to increase the wanted level for the player, it should save the Wanted Level into the player's account file.
For the save, under OnPlayerDisconnect i use :
The command is :
So normaly, it should save the WantedLevel, but It doesn't.
2. The second issue, is normaly that when the player's wanted level increase to 2, the player's color should be yellow, but it doesn't..
WEIRD..
Hope getting your answers as soon as possible.
Today, I've started a new RPG gamemode, but I have 2 weird issues that I've never had before.
1.When I create a command to increase the wanted level for the player, it should save the Wanted Level into the player's account file.
For the save, under OnPlayerDisconnect i use :
PHP код:
SavedWantedLevel[playerid] =WantedLevel[playerid];
PHP код:
dcmd_rec(playerid,params[])
{
new ID;
new lvl;
new string[128];
if(sscanf(params,"ui",ID,lvl))
{
SendClientMessage(playerid,COLOR_ERROR,"Utilisation: /rec (Pseudo/ID) (Niveau de recherche)");
return 1;
}
if(IsSpawned[ID] == 0)
{
format(string,sizeof(string),"Ce joueur doit кtre vivant pour pouvoir utiliser cette commande.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"Ce joueur n'est pas connectй.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
IncreaseWantedLevel(ID,lvl);
WantedLevel[ID] =lvl;
return 1;
}
2. The second issue, is normaly that when the player's wanted level increase to 2, the player's color should be yellow, but it doesn't..
WEIRD..
Hope getting your answers as soon as possible.