SA-MP Forums Archive
Help[+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[+rep] (/showthread.php?tid=547519)



Help[+rep] - [SU]Spartan - 23.11.2014

How can I give someone a hydra via cmd for example
/givemehunter and u take hunter how can i make it?
+rep


Re: Help[+rep] - CutX - 23.11.2014

easily accomplished using YCMD

/spawnhunter -> just spawns the hunter at you position
/givehunter ID -> spawns the hunter at someone's position
pawn Код:
#include    "a_samp"
#include    "YSI\y_commands"

YCMD:spawnhunter(playerid,params[],help)//usage: /spawnhunter
{
    new Float:p[3];
    GetPlayerPos(playerid,p[0],p[1],p[2]);
    CreateVehicle(520,p[0]+2.5,p[1]-2.5,p[2]+1,0,1,1,-1);
    return 1;
}

YCMD:givehunter(playerid,params[],help)//usage: /givehunter PLAYERID
{
    if(!IsPlayerConnected(strval(params))) return GameTextForPlayer(playerid,"~r~Invalid ID",3000,3);
    new Float:p[3];
    GetPlayerPos(strval(params),p[0],p[1],p[2]);
    CreateVehicle(520,p[0]+2.5,p[1]-2.5,p[2]+1,0,1,1,-1);
    return 1;
}



Re: Help[+rep] - [SU]Spartan - 23.11.2014

thanks you repped