[HELP] Making Tuned Spawned Vehicles for 1 person -
Shadow_ - 12.04.2009
Ok, so i want to make a vehicle but a tuned one i imagine that i start by doing
new gTunedFlash;
gTunedFlash = CreateVehicle(blahblahlbalh);
gTunedFlash {
MODLE IDS
}
if i went wrong then tell me!
i also want to set the numberplate but will it work because i know you have to respawn the vehicle?
but after that i would like to make the car just for 1 person so there name could someone tell me the way of doing it? and if the person that enters the car doesn't have that name eg. [Sw]Shadows car? they get slaped or somthing?
Please HELP!!!!
Shadow
Re: [HELP] Making Tuned Spawned Vehicles for 1 person -
Shadow_ - 13.04.2009
anyone there?
Re: [HELP] Making Tuned Spawned Vehicles for 1 person -
Shadow_ - 13.04.2009
Sorry for now Triple post! But is anyone out there that can help me plz?
Re: [HELP] Making Tuned Spawned Vehicles for 1 person -
fallen - 14.04.2009
hey, not so sure about the liscene plate b4, never looked into it b4,
but with the slap part you could do a simple function something like
Code:
new PlayerName[MAX_PLAYER_NAME], string[128], str[128], file[256];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
if(playername == blahblah && player is in car gflash or w.e you call it <<-- this statment would probably be pretty complex, it just looks simple cuz im not putting it out fully){
set player in car = false
or just copy a /slap function from a admin script. heres the one mine uses
new Float:Health, Float:x, Float:y, Float:z; GetPlayerHealth(player1,Health); SetPlayerHealth(player1,Health-25);
GetPlayerPos(player1,x,y,z); SetPlayerPos(player1,x,y,z+5); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(player1,1190,0.0,0.0,0.0);
sorry that the syntax for playername wasnt right, im tired atm and dont have energy to make a new code in pawno xD
but hope that points you in the right direction
Re: [HELP] Making Tuned Spawned Vehicles for 1 person -
ICECOLDKILLAK8 - 14.04.2009
pawn Code:
// Top of script
forward ElevatePlayer(playerid, amount);
// Anywhere in script
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(strcmp(PlayerName, "[Sw]Shadow", true) == 1 && GetPlayerVehicleID(playerid) == gTunedFlash)
{
SendClientMessage(playerid, color, "You are not allowed to drive this"); // Replace color with a color of your choice
RemovePlayerFromVehicle(playerid);
SetTimerEx("ElevatePlayer", 1000, 0, "dd", playerid, 5); // If you want to slap them higher then change 5 to another value
}
return 1;
}
return 1;
}
// Anywhere in script
public ElevatePlayer(playerid, amount)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + amount);
return 1;
}
Re: [HELP] Making Tuned Spawned Vehicles for 1 person -
Shadow_ - 14.04.2009
Cheers
EDIT::: Would this work perfectly is that the hole thing? or do i need to edit anything you have put?
Re: [HELP] Making Tuned Spawned Vehicles for 1 person -
LarzI - 14.04.2009
Read the comments...