PDA

View Full Version : command "/ftog" is bugged


joko2021
04/07/2014, 11:54 PM
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

Abagail
04/07/2014, 11:58 PM
Whats PlayerInfo[playerid][pranklvl]? Could this be an issue?

joko2021
05/07/2014, 12:06 AM
i don't think so,i think it's a complicated problem -_-

Jack_Leslie
05/07/2014, 12:10 AM
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"