Need help with /myinfo command
#1

CMD:myinfo(playerid,params[])
{
GetPlayerIp(playerid, name[], len);
GetPlayerSkin(playerid);
GetPlayerScore(playerid);
GetPlayerMoney(playerid);
GetPlayerWeapon(playerid);
GetPlayerAmmo(playerid);
GetPlayerPing(playerid);
return 1;
}



Quote:

C:\Users\ADMIN\Desktop\Server\gamemodes\Testing.pw n(49 : error 017: undefined symbol "name"

I get this error when compiling. I need to know what I did wrong + I need to know how to show this to the player. I'm a newb.
Reply
#2

pawn Код:
CMD:myinfo( playerid, params[ ] )
{
    new p_IP[ 16 ], sz_msg[ 128 ];
    GetPlayerIp( playerid, p_IP, 16 );
    format( sz_msg, sizeof( sz_msg ), "IP: (%s) Skin: (%d) Score: (%d) Money: (%d) Weapon: (%d) Ammo: (%d) Ping: (%d)", p_IP, GetPlayerSkin( playerid ), GetPlayerScore( playerid ), GetPlayerMoney( playerid ), GetPlayerWeapon( playerid ), GetPlayerAmmo( playerid ), GetPlayerPing( playerid ) );
    SendClientMessage( playerid, -1, sz_msg );
    return 1;
}
You have to make a new variable to store the ip.
Also, you should format the message and then send the custom one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)