Need some help
#1

I got this rp gamemode from a friend anyways, im trying to make it so that if you get invited to a faction you got to /accept it but the /invite command works but when they do /accept faction it doesnt work
This is under the /accept faction command
PHP код:
    else if(!strcmp(params"faction"true))
    {
        if(
GetPVarInt(playerid"InvitedToFaction"))
        {
            
Invite(playeridGetPVarInt(playerid"InvitedToFaction"), PlayerName(playerid));
            
SetPVarInt(playerid"InvitedToFaction"0);
        }
        return 
1;
    } 
PHP код:
COMMAND:invite(playeridparams[])
{
    if(
PlayerInfo[playerid][ranklvl] > 1) return SendClientError(playeridCANT_USE_CMD);
    if(
PlayerInfo[playerid][playerteam] == CIV) return SendClientError(playeridCANT_USE_CMD);
    new 
iPlayer;
    if( 
sscanf params"u"iPlayer)) return SCP(playerid"[PlayerID/PartOfName]");
    if(!
IsPlayerConnected(iPlayer) || iPlayer == playerid) return SendClientError(playeridPLAYER_NOT_FOUND);
    if(
GetPlayerFaction(iPlayer) != CIV) return SendClientError(playerid"Player is not a civilian!");
    if(
PlayerInfo[iPlayer][playerlvl] < && PlayerInfo[playerid][playerteam] != COPS)
    return 
SendClientError(playerid,   "The player is level 1.");
    
SetPVarInt(iPlayer"InvitedToFaction"PlayerInfo[playerid][playerteam]);
    
format(iStrsizeof(iStr), "%s has invited you to join %s. Use ~r~/accept faction~w~ to join %s."RPName(playerid), PlayerInfo[playerid][PTeamName],PlayerInfo[playerid][PTeamName]);
    
ShowInfoBox(iPlayer"Faction Invite"iStr);
    return 
1;

The /invite command works well only the accept park doesnt work
Reply


Messages In This Thread
Need some help - by 1fret - 04.09.2017, 03:37
Re: Need some help - by coool - 04.09.2017, 07:59
Re: Need some help - by kAn3 - 04.09.2017, 10:42

Forum Jump:


Users browsing this thread: 1 Guest(s)