Loose identitation - 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: Loose identitation (
/showthread.php?tid=612067)
Loose identitation -
Zeus666 - 13.07.2016
Код:
CMD:b(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1,""chat" /b [OOC chat]");
new string[128];
if(pInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "((Administrator %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_LIGHTBLUE);
return 1;
}
if(pInfo[playerid][pHelperDuty] == 1)
{
format(string, sizeof(string), "((Helper %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_LIGHTBLUE);
return 1;
}
if(pInfo[playerid][IsPlayerMuted] == 1)
{
SendClientMessage(playerid,-1,"*"COL_RED" Nu poti vorbi cat timp ai mute ! ");
}
format(string, sizeof(string), "(( %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_WHITE);
return 1;
}
I can't find the damn line.
I have a clue that i have too many return 1's. But not sure.
But everything looks good aligned.
Re: Loose identitation - WhiteGhost - 13.07.2016
Here.
Код:
CMD:b(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1,""chat" /b [OOC chat]");
new string[128];
if(pInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "((Administrator %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_LIGHTBLUE);
return 1;
}
if(pInfo[playerid][pHelperDuty] == 1)
{
format(string, sizeof(string), "((Helper %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_LIGHTBLUE);
return 1;
}
if(pInfo[playerid][IsPlayerMuted] == 1)
{
SendClientMessage(playerid,-1,"*"COL_RED" Nu poti vorbi cat timp ai mute ! ");
}
format(string, sizeof(string), "(( %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_WHITE);
return 1;
}
Re: Loose identitation -
Zeus666 - 13.07.2016
Still gives error on the same line (red bolded)
Re: Loose identitation -
Untonyst - 13.07.2016
PHP код:
CMD:b(playerid,params[])
{
if(isnull(params))
return SendClientMessage(playerid, -1, ""chat" /b [OOC chat]");
new string[128];
if(pInfo[playerid][pAdminDuty] == 1)
{
format(string, sizeof(string), "((Administrator %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_LIGHTBLUE);
return 1;
}
if(pInfo[playerid][pHelperDuty] == 1)
{
format(string, sizeof(string), "((Helper %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_LIGHTBLUE);
return 1;
}
if(pInfo[playerid][IsPlayerMuted] == 1)
{
SendClientMessage(playerid,-1,"*"COL_RED" Nu poti vorbi cat timp ai mute ! ");
}
format(string, sizeof(string), "(( %s spune: %s ))", PlayerName(playerid), params);
ProxDetector(20.0, playerid, string, COLOR_WHITE);
return 1;
}
Re: Loose identitation -
Zeus666 - 13.07.2016
+1 untonsty. it works. thanks