Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: The_Lucifer on August 30, 2014, 10:28:59 pm

Title: Nice account info cmd
Post by: The_Lucifer on August 30, 2014, 10:28:59 pm
Hello all!, I created an account info cmd, here it is

Code: [Select]
else if ( strcmp( cmd, "!cuenta", true ) == 0 )
    {
new ip[ 24 ];
                GetPlayerIp( playerid, ip, 24 );
new level; level = GetPlayerAdminLevel(gPlayers[ playerid ] );
format( file, sizeof( file ), USERS_FILE, gPlayers[ playerid ] );
new kills, deaths; kills = dini_Int( file, "Kills" ), deaths = dini_Int( file, "Deaths" );
new Float:ratio=floatdiv(kills, deaths);
eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°Nick: %s °Nivel: %d °Estado: %s", gPlayers[ playerid ], level, StatusTag( level ) );
if ( GetPlayerState( playerid ) == 1 ) eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°ID: %s °Posicion: A pie.", playerid);//FOOT
    if ( GetPlayerState( playerid ) == 2 ) eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°ID: %s °Posicion: En auto (conductor)", playerid); //CAR_DRIVER
        if ( GetPlayerState( playerid ) == 3 ) eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°ID: %s °Posicion: En auto (passagero)", playerid); //CAR_PASSENGER
    if ( GetPlayerState( playerid ) == 7 ) eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°ID: %s °Posicion: Escojiendo Skin.", playerid); //CLASS_SELECTION
    eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°Ubicacion: %s", GetPlayerLocation( playerid ));
eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°Assesinatos: %d °Muertes: %d °Ratio: %.4f", kills, deaths, ratio );
eFormatMessageSentToPlayer( playerid, 0xFF9724FF,"°IP: %s",  ip );
return 1;
     }
Any bugs? tell me!
And i almost forgot, if eFormatMessageSentToPlayer gives u error, change it to SendClientMessage
Thanks
Title: Re: Nice account info cmd
Post by: NE.Restricted on August 31, 2014, 06:34:40 pm
Changing to SendClientMessage will bugged your script and give warning. To fix replace it with one of your functions to send a formatted message.
Title: Re: Nice account info cmd
Post by: The_Lucifer on August 31, 2014, 06:48:00 pm
Okay yea, but on my script i have it with eFormatedMessageToPlayer (the one u gave me) and it gives me 0 warnings :D
Title: Re: Nice account info cmd
Post by: NE.Restricted on September 01, 2014, 05:31:37 pm
I know. eFormatMessageSentToAll(or SentToPlayer) is a different function from SendClientMessage(ToAll)
Title: Re: Nice account info cmd
Post by: NeskWriter on September 01, 2014, 08:44:52 pm
You should post all the functions included in your code.

Quote from: NE.Restricted
For forum moderators: Change my name to NE.CrystalBlue
For fuck sake Res