03.01.2012, 08:11
Hi, i rlly need simple command /invite faction, on zcmd/sscanf - please simple command cuz i made something wrong with mines....
everytime i used it says player is not connected
pawn Code:
new
id;
if(sscanf( params, "u", id )) return SendClientMessage(playerid, COLOR_RED,"Komanda: /priimti [ћaidėjo 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 į savo frakcija",name);
SendClientMessage(playerid, -1,string);
if ( PVar[ playerid][pFactionL ] == 1 ) SendClientMessage( id,-1,"Jūs priimtas į policijos departamentą" ); SetPlayerSkin( id, 120 ); PVar[ id ][ pUniform ] = 120; PVar[ id ][ pUniformc ] = true;
if( PVar[ playerid][pFactionL ] == 2 ) SendClientMessage( id,-1,"Jūs priimtas į medicinos departamentą" ); SetPlayerSkin( id, 71 ); PVar[ id ][ pUniform ] = 71; PVar[ id ][ pUniformc ] = true;
if( PVar[ playerid][pFactionL ] == 3 ) SendClientMessage( id,-1,"Jūs priimtas į mechanikų departamentą" ); SetPlayerSkin( id, 50 ); PVar[ id ][ pUniform ] = 50; PVar[ id ][ pUniformc ] = true;
if( PVar [playerid][pFactionL ] == 4 ) SendClientMessage( id,-1,"Jūs priimtas į taksi departamentą" ); 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;
}