Working ZCMD /invite
#2

pawn Code:
CMD:priimti(playerid, params[])
{
    new
        id;
    if(sscanf( params, "u", id )) return SendClientMessage(playerid, COLOR_RED,"Komanda: /priimti [žaidejo nick / id]");
    if(PVar[playerid][pFactionL] > 0) {
        if(id != INVALID_PLAYER_ID) {
            if(PVar[id][pFaction] == 0) {
                new string[256],name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, sizeof(name));
                format(string, sizeof(string), "Pakvietei %s dirbti i savo frakcija",name);
                SendClientMessage(playerid, -1,string);

                if     ( PVar[ playerid][pFactionL ] == 1 ) SendClientMessage( id,-1,"Jus priimtas i policijos departamenta" ); SetPlayerSkin( id, 120 ); PVar[ id ][ pUniform ] = 120; PVar[ id ][ pUniformc ] = true;
                if( PVar[ playerid][pFactionL ] == 2 ) SendClientMessage( id,-1,"Jus priimtas i medicinos departamenta" ); SetPlayerSkin( id, 71 ); PVar[ id ][ pUniform ] = 71; PVar[ id ][ pUniformc ] = true;
                if( PVar[ playerid][pFactionL ] == 3 ) SendClientMessage( id,-1,"Jus priimtas i mechaniku departamenta" ); SetPlayerSkin( id, 50 ); PVar[ id ][ pUniform ] = 50; PVar[ id ][ pUniformc ] = true;
                if( PVar [playerid][pFactionL ] == 4 ) SendClientMessage( id,-1,"Jus priimtas i taksi departamenta" );   SetPlayerSkin( id, 223); PVar[ id ][ pUniform ] = 223; PVar[ id ][ pUniformc ] = true;

                return 1;
            }
            else {
                GameTextForPlayer(playerid,"~r~Zaidejas turi darba.",5000,3);
            }
        }
        else {
            GameTextForPlayer(playerid,"~r~Player is not connected.",5000,3);
        }
    }
    else {
        GameTextForPlayer(playerid,"~r~Tu ne direktorius.",5000,3);
    }
    return 1;
}
It's != so, the player is valid ID
Reply


Messages In This Thread
Working ZCMD /invite - by No Fear - 03.01.2012, 08:11
Re: Working ZCMD /invite - by Konstantinos - 03.01.2012, 08:25
Re: Working ZCMD /invite - by No Fear - 03.01.2012, 08:49
Re: Working ZCMD /invite - by Konstantinos - 03.01.2012, 08:52
Re: Working ZCMD /invite - by No Fear - 03.01.2012, 08:53
Re: Working ZCMD /invite - by No Fear - 03.01.2012, 10:19
Re: Working ZCMD /invite - by CaHbKo - 03.01.2012, 10:37

Forum Jump:


Users browsing this thread: 1 Guest(s)