SA-MP Forums Archive
help-me+rep - 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: help-me+rep (/showthread.php?tid=651921)



help-me+rep - Izaque1998 - 30.03.2018

how can I make this check functionally?


my code(not working)
PHP код:
new xtrailer;
public 
OnGameModeInit()
{
    
xtrailer AddStaticVehicleEx(5911800.7312,630.3682,10.8203,278.7035001001, -10);
    
    return 
1;
}
CMD:test(playerid)
{
    if( 
GetVehicleModelGetVehicleTrailerGetPlayerVehicleID(playerid) ) ) == xtrailer)
    {
            
//Command stuff
    
}
    else return 
SendClientMessage(playerid, -1"ERROR: You must attach a (xtrailer) trailer to your vehicle first!");
    return 
0;




Re: help-me+rep - ASGOOD - 30.03.2018

if( IsPlayerInAnyVehicle( GetVehicleTrailer( GetPlayerVehicleID(playerid) ) ) == xtrailer)


Re: help-me+rep - MadeMan - 30.03.2018

pawn Код:
if( GetVehicleTrailer( GetPlayerVehicleID(playerid) ) == xtrailer)



Re: help-me+rep - Izaque1998 - 30.03.2018

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
pawn Код:
if( GetVehicleTrailer( GetPlayerVehicleID(playerid) ) == xtrailer)
very good, it's working now tks+rep