[HELP] Need help with /sl -
Stefand - 29.05.2012
hey,
I made a Show license command.
but when i compile it it gives errors about not difined etc. from OTHER commands.
maybe someone sees the problem.
pawn Код:
command(sl, playerid, params[])
{
new id, string[128];
if(sscanf(params, "u", id))
{
if(Player[id][DriverLic] == 1){
format(string, sizeof(string), "------------[LICENSES]------------", GetName(playerid));
SendClientMessage(id, ORANGE, string);
format(string, sizeof(string), "Driver: Valid", GetName(playerid));
SendClientMessage(id, WHITE, string);
format(string, sizeof(string), "------------[LICENSES]------------", GetName(playerid));
}
else
{
if(Player[id][DriverLic] == 0)
{
format(string, sizeof(string), "------------[LICENSES]------------", GetName(playerid));
SendClientMessage(id, ORANGE, string);
format(string, sizeof(string), "Driver: Invalid", GetName(playerid));
SendClientMessage(id, WHITE, string);
format(string, sizeof(string), "------------[LICENSES]------------", GetName(playerid));
SendClientMessage(id, ORANGE, string);
}
return 1;
}
Re: [HELP] Need help with /sl -
FalconX - 29.05.2012
pawn Код:
CMD:sl( playerid, params[ ] )
{
new id, string[ 128 ];
if( sscanf( params, "u", id ) ) return SendClientMessage( playerid, -1, "/sl [playerid]" );
if( IsPlayerConnected( id ) ) return SendClientMessage( playerid, -1, "ERROR: PLAYER NOT CONNECTED" );
if( id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "INvalid player id" );
if( Player[ id ][ DriverLic ] == 1 )
{
SendClientMessage( playerid, ORANGE, "------------[LICENSES]------------" );
format( string, sizeof( string ), "Driver Name: %s STATUS: Valid", GetName( id ) );
SendClientMessage( playerid, WHITE, string );
SendClientMessage( playerid, ORANGE, "------------[LICENSES]------------" );
}
else
{
SendClientMessage( playerid, ORANGE, "------------[LICENSES]------------" );
format( string, sizeof( string ), "Driver Name: %s STATUS: Invalid", GetName( id ) );
SendClientMessage( playerid, WHITE, string );
SendClientMessage( playerid, ORANGE, "------------[LICENSES]------------" )
}
return 1;
}
Hope this helps
_FalconX
Re: [HELP] Need help with /sl -
Stefand - 29.05.2012
I'll try it tomorrow.
Re: [HELP] Need help with /sl -
Stefand - 31.05.2012
Still not working
Re: [HELP] Need help with /sl -
mati233 - 31.05.2012
It would be easier to help you if you show your error logs.
Re: [HELP] Need help with /sl -
ViniBorn - 31.05.2012
pawn Код:
CMD:sl( playerid, params[ ] )
{
new id;
if( sscanf( params, "r", id ) ) return SendClientMessage( playerid, -1, "/sl [playerid]" );
if( IsPlayerConnected( id ) ) return SendClientMessage( playerid, -1, "ERROR: PLAYER NOT CONNECTED" );
if( id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "Invalid player id" );
new VBString[ 64 ];
if( Player[ playerid ][ DriverLic ] == 1 )
format( VBString, sizeof( VBString), "Driver Name: %s STATUS: Valid", GetName( playerid ) );
else
format( VBString, sizeof( VBString), "Driver Name: %s STATUS: Invalid", GetName( playerid ) );
SendClientMessage( id, ORANGE, "------------[LICENSES]------------" );
SendClientMessage( id, WHITE, VBString);
SendClientMessage( id, ORANGE, "------------[LICENSES]------------" );
return 1;
}