15.02.2017, 16:45
Hello there guys. I have a little problem with '/weaps' command.
This command since yesterday is making me some problems.
The problem is that, it is crashing my server.
And in server log appears this:
SERVER LOG:
COMMAND: '/WEAPS'.
If you you guys know how to fix it, please reply.
This command since yesterday is making me some problems.
The problem is that, it is crashing my server.
And in server log appears this:
SERVER LOG:
PHP код:
[19:18:58] [debug] AMX backtrace:
[19:18:58] [debug] #0 00000065 in ?? (... <28 arguments>) at C:\Users\User\Dropbox\Server\IS\pawno\include\float.inc:102
[19:18:58] [debug] #1 00000065 in public cmd_weaps () at C:\Users\User\Dropbox\Server\IS\pawno\include\float.inc:102
[19:18:58] [debug] #2 native CallLocalFunction () [080dfac0] from samp03svr
[19:18:58] [debug] #3 000087c8 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x0046b264 "/weaps 14") at C:\Users\User\Dropbox\Server\IS\pawno\include\zcmd.inc:108
PHP код:
CMD:weaps( playerid, params[ ] )
{
CheckLevel( playerid, 2 );
new Player, Weapon, Ammo, WeaponName[ 20 ];
if( sscanf( params, "u", Player ) )
{
SendUsage( playerid, "/weaps [Player ID]" );
return 1;
}
else
{
if( Player == INVALID_PLAYER_ID )
return SendError( playerid, "This player is not connected !" );
new Title_String[ 5000 ];
if( Player != playerid ) format( Title_String, sizeof( Title_String ), "{%06x}%s(%d) {FFFFFF}weapons:", GetPlayerColor( Player ) >>> 8, PlayerName( Player ), Player );
else Title_String = "{FFFFFF}My weapons:";
eString[ 0 ] = EOS;
eString = "{FFFFFF}ID\t{FFFFFF}Weapon Name\t{FFFFFF}Ammo\n";
for( new w = 0; w < 9; w++ )
{
GetPlayerWeaponData( Player, w, Weapon, Ammo );
if( Ammo < 0 ) Ammo = 9999;
if( Weapon != 0 )
{
GetWeaponName( Weapon, WeaponName[ w ], 20 );
format( eString, sizeof( eString ), "{FFFFFF}%s\t%d\t{FFFF55}%s\t{C0C0C0}%d\n", eString, w, WeaponName[ w ], Ammo );
}
}
ShowPlayerDialog( playerid, EMPTY_DIALOG, DIALOG_STYLE_TABLIST_HEADERS, Title_String, eString, "Ok", "" );
}
return 1;
}