Author Topic: Nice account info cmd  (Read 2742 times)

0 Members and 1 Guest are viewing this topic.

Offline The_Lucifer

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Nice account info cmd
« 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

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: Nice account info cmd
« Reply #1 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.
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline The_Lucifer

  • Street Thug
  • *
  • Posts: 20
    • View Profile
Re: Nice account info cmd
« Reply #2 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

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
Re: Nice account info cmd
« Reply #3 on: September 01, 2014, 05:31:37 pm »
I know. eFormatMessageSentToAll(or SentToPlayer) is a different function from SendClientMessage(ToAll)
« Last Edit: September 01, 2014, 05:35:53 pm by NE.Restricted »
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Nice account info cmd
« Reply #4 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


-Funniest quotes-

Quote from: asad3man
i cant able to understand