give player vehicle
#1

hello , how to spawn (NRG-500) when player teleport to example>>

CMD:mj(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid);
tseconds[playerid] = 6;
format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
if(PlayerInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
vCount[playerid] = 1;
Tx[playerid] =2910.058837;
Ty[playerid] =-1688.298217;
Tz[playerid] =872.815063;
Ti[playerid] = 0;
new string[128];
new dsname[MAX_PLAYER_NAME];
format(telestring,43,"Mega Jump!!!");
GetPlayerName(playerid, dsname, sizeof(dsname));
format(string, sizeof(string), "[TELE]:%s has Just Teleported To The Mega Jump {00FF00}/mj ", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
// instunt[playerid] = 1;
SetTimerEx("setstunt",3000,0,"i", playerid);

return 1;
}

stock setstunt(playerid) {
instunt[playerid] = 1;
}
Reply
#2

maybe you can add this script in your command
Quote:

new motor;
new Float1,Float:y1, Float:z1;
GetPlayerPos(playerid, x1, y1, z1);
motor= CreateVehicle(522, x1,y1,z1, 82.2873, -1, -1, 60); // u can edit this for bike id
PutPlayerInVehicle(playerid, motor, 0); // put player as driver

i hope this work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)