31.05.2010, 15:03
He guys. i've got a new problem.
I have a script that when you you /lspds you see how much lspd members are online.
This is the command:
But when I use that and there is just 1 LSPD member online it says there are 500 lspd members online.
And when there are 2 members online it also say that there are 500?...
Please help
This is another command for LSPD.
And this:
That 2 commands are working fine
Thanks In ADVANCE!
I have a script that when you you /lspds you see how much lspd members are online.
This is the command:
Код:
if (strcmp("/lspds", cmdtext, true, 10) == 0)
{
new lspd_online = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][LSPDLEVEL] >= 1)
{
lspd_online++;
}
}
And when there are 2 members online it also say that there are 500?...
Please help
This is another command for LSPD.
Код:
dcmd_setlspd(playerid,params[])
{
new giveplayerid,level;
if(sscanf(params, "ud", giveplayerid,level)) return SendClientMessage(playerid,red, "Usage: /Setlspd [Playerid/Partname] [Level]");
else if(PlayerInfo[playerid][LSPDLEVEL] < 8) return SendClientMessage(playerid,red,"You Need To Be 8+ Lspd Level To Use This Command");
else if(PlayerInfo[giveplayerid][LSPDLEVEL] == 0) return SendClientMessage(playerid,red,"That Player Need To Be Your Member");
else
{
new string[128],string2[128],gpiname[24],pNamE[24]; GetPlayerName(playerid,pNamE,24); GetPlayerName(giveplayerid,gpiname,24);
format(string,sizeof(string),"You Have Made %s Rank %d",gpiname,level);
SendClientMessage(playerid,red,string);
format(string2,sizeof(string2),"%s Made You Rank %d",pNamE,level);
SendClientMessage(giveplayerid,red,string2);
PlayerInfo[giveplayerid][LSPDLEVEL] = level;
}
return 1;
}
Код:
dcmd_lspdleader(playerid, params[])
{
if(PlayerInfo[playerid][Level] >= 1)
{
new tmp[256], tmp2[256], Index;
tmp = strtok(params,Index),
tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /lspdleader [playerid]");
new player1,playername[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(!strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /lspdleader [playerid]");
GetPlayerName(player1,playername,sizeof(playername));
format(string,sizeof(string),"You have made %s LSPD leader",playername);
SendClientMessage(playerid,red,string);
PlayerInfo[player1][LSPDLEVEL] = 10;
SendClientMessage(player1,red,"You are now lspd leader");
}
else SendClientMessage(playerid,red,"You are not an admin");
return 1;
}
Thanks In ADVANCE!




