Fix Someone Car Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Fix Someone Car Help (
/showthread.php?tid=614514)
Fix Someone Car Help -
alishvasis - 09.08.2016
Hi I Wrote Fix Cmd To Someone Car For Admins But Give Me Many Errors And Not Worked Anyone Can Fix It Ore Give Me This Script ? Thanks Alot
PHP код:
CMD:arepair( playerid, params[] ) {
if( PlayerInfo[ playerid ][ pAdmin ] < 3 ) return SendClientMessage( playerid, 0xFFFFFFFF, "Not authorized!" );
new ID_2;
if( sscanf( params, "u", ID_2 )) return SendClientMessage( playerid, 0xFFFFFFFF, "Usage: /repair [ID/PartOfName]" );
if( !IsPlayerConnected( ID_2 ) || ID_2 == INVALID_PLAYER_ID ) return SendClientMessage( playerid, 0xFFFFFFFF, "Wrong ID!" );
if( !GetPlayerVehicleID( ID_2 ) ) return SendClientMessage( playerid, 0xFFFFFFFF, "That player is not in a vehicle!" );
RepairVehicle( GetPlayerVehicleID( ID_2 ) );
SendClientMessage( playerid, 0xFFFFFFFF, "Vehicle repaired!" );
return true;
}
And Errors:
Код HTML:
: warning 217: loose indentation
: error 029: invalid expression, assumed zero
: error 017: undefined symbol "cmd_arepair"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line
Re: Fix Someone Car Help -
Whatname - 09.08.2016
Change:
PHP код:
if( !GetPlayerVehicleID( ID_2 ) ) return SendClientMessage( playerid, 0xFFFFFFFF, "That player is not in a vehicle!" );
To:
PHP код:
if(!IsPlayerInAnyVehicle(ID_2 ) return SendClientMessage( playerid, 0xFFFFFFFF, "That player is not in a vehicle!" );
and rest of the error coming from the include try to reinstall it
Re: Fix Someone Car Help -
alishvasis - 09.08.2016
Iv Fixed This! Thankssss All And WhatName + Rep For Ans <3