command "/ftog" is bugged - 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: command "/ftog" is bugged (
/showthread.php?tid=524035)
command "/ftog" is bugged -
joko2021 - 04.07.2014
Код:
COMMAND:ftog(playerid, params[])
{
if(GetPlayerFaction(playerid) == CIV) return SendClientError(playerid, CANT_USE_CMD);
if(PlayerInfo[playerid][ranklvl] > 1) return SendClientError(playerid, CANT_USE_CMD);
new fname[ 50 ], wat[ 20 ];
format(fname, sizeof(fname), "Team-%s.txt", PlayerInfo[playerid][PTeamName]);
if(dini_Int(fname, "ftog") == 1)
{
dini_IntSet(fname, "ftog", 0);
myStrcpy(wat, "disabled");
}
else if(dini_Int(fname, "ftog") == 0)
{
dini_IntSet(fname, "ftog", 1);
myStrcpy(wat, "enabled");
}
format(iStr, sizeof(iStr), "# [%s] %s has %s the OOC faction chat.", PlayerInfo[playerid][PTeamName], PlayerName(playerid), wat);
SendClientMessageToTeam(PlayerInfo[playerid][playerteam],iStr,COLOR_PLAYER_VLIGHTBLUE);
return 1;
}
the problem is that /ftog is working for factions and not working for another factions
Re: command "/ftog" is bugged -
Abagail - 04.07.2014
Whats PlayerInfo[playerid][pranklvl]? Could this be an issue?
Re: command "/ftog" is bugged -
joko2021 - 05.07.2014
i don't think so,i think it's a complicated problem -_-
Re: command "/ftog" is bugged -
Jack_Leslie - 05.07.2014
pawn Код:
if(GetPlayerFaction(playerid) == CIV) return SendClientError(playerid, CANT_USE_CMD);
You've got it set to working only for 'CIV'?
At least tell us where the code stops for "other factions"