SA-MP Forums Archive
Vehicle Ammount 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: Vehicle Ammount HELP (/showthread.php?tid=576279)



Vehicle Ammount HELP - FrankLucretti - 02.06.2015

How do I put in this script also the Hydra ID?

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp("/sync"cmdtexttrue) == 0)
    {
       new 
Float:pX,Float:pY,Float:pZ;
       
GetPlayerPos(playerid,pX,pY,pZ);
       
SetPlayerPos(playerid,pX+2,pY+2,pZ+2);
       
SendClientMessage(playerid0x90EE90AA,"You Have Just Syncronized.");
       return 
1;
    }
    if (
strcmp("/ej"cmdtexttrue10) == 0)
    {
    
GetPlayerVehicleID(playerid);
    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 476)
    {
    
GivePlayerWeapon(playerid,46,1);
    new 
Float:pX,Float:pY,Float:pZ;
    
GetPlayerPos(playerid,pX,pY,pZ);
    
SetPlayerPos(playerid,pX+2,pY+2,pZ+100);
    }
    else
    {
    
SendClientMessage(playerid0x90EE90AA"You Are Not In A Rustler");
    }
    return 
1;
    }
    return 
0;




Re: Vehicle Ammount HELP - FrankLucretti - 02.06.2015

can anybody help?


Re: Vehicle Ammount HELP - Alpay0098 - 02.06.2015

Quote:
Originally Posted by FrankLucretti
Посмотреть сообщение
can anybody help?
Can you explain MORE It won't make you tired dude.


Re: Vehicle Ammount HELP - Alpay0098 - 02.06.2015

Finally understood
PHP код:
    if (strcmp("/ej"cmdtexttrue10) == 0)
    {
        
GetPlayerVehicleID(playerid);
        if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 476 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 520)
        {
            
GivePlayerWeapon(playerid,46,1);
            new 
Float:pX,Float:pY,Float:pZ;
            
GetPlayerPos(playerid,pX,pY,pZ);
            
SetPlayerPos(playerid,pX+2,pY+2,pZ+100);
        }
        else
        {
            
SendClientMessage(playerid0x90EE90AA"You Are Not In A Rustler");
        }
        return 
1;
    } 



Re: Vehicle Ammount HELP - FrankLucretti - 02.06.2015

Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
Finally understood
PHP код:
    if (strcmp("/ej"cmdtexttrue10) == 0)
    {
        
GetPlayerVehicleID(playerid);
        if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 476 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 520)
        {
            
GivePlayerWeapon(playerid,46,1);
            new 
Float:pX,Float:pY,Float:pZ;
            
GetPlayerPos(playerid,pX,pY,pZ);
            
SetPlayerPos(playerid,pX+2,pY+2,pZ+100);
        }
        else
        {
            
SendClientMessage(playerid0x90EE90AA"You Are Not In A Rustler");
        }
        return 
1;
    } 
Thank you man, +1rep for yaaaa