03.01.2012, 08:25
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;
}