Help me - 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: Help me (
/showthread.php?tid=630946)
Help me -
Langky - 20.03.2017
LuxAdmin.pwn(5621) : warning 217: loose indentation
PHP код:
#pragma unused params
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "_________ |- Online Vip Member -| _________");
SendClientMessage(playerid, green, " ");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
Count++;
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
{
if(AccInfo[i][pVip] > 0)
{
switch(AccInfo[i][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
{
format(string, sizeof(string), "%s (Id:%i) | %s",PlayerName2(i),i,AccType);
SendClientMessage(playerid,yellow,string);
}
}
if(Count == 0)
return SendClientMessage(playerid,red, "No players have VIP Account!");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
Re: Help me -
Mencent - 20.03.2017
Hello!
You get this warning when you have something like this:
PHP код:
SendClientMessage(playerid,-1,"This is a test message.");
return 1;
This is wrong.
PHP код:
SendClientMessage(playerid,-1,"This is a test message.");
return 1;
That's correct.
Try to find this mistake.
Re: Help me -
RyderX - 20.03.2017
Here you go
PHP код:
#pragma unused params
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "_________ |- Online Vip Member -| _________");
SendClientMessage(playerid, green, " ");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
Count++;
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
{
if(AccInfo[i][pVip] > 0)
{
switch(AccInfo[i][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
{
format(string, sizeof(string), "%s (Id:%i) | %s",PlayerName2(i),i,AccType);
SendClientMessage(playerid,yellow,string);
}
}
if(Count == 0)
return SendClientMessage(playerid,red, "No players have VIP Account!");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}