[question] how i creat car - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [question] how i creat car (
/showthread.php?tid=245403)
[question] how i creat car -
JOKERBOY - 31.03.2011
how do i creat a car for a "x" job ?
Re: [question] how i creat car -
Hornet600 - 31.03.2011
new mechaniccar = CreateVehicle
// command
if(isplayerinvehicle(playerid, mechanicar)
{
// your code
}
Re: [question] how i creat car -
JOKERBOY - 31.03.2011
Example ?
pawn Код:
{
if(IsPlayerInVehicle(playerid,taxicar[1])//se tiver no carro "seucarro"
{
if(Profissao[playerid] == TAXISTA)
{
RemovePlayerFromVehicle(playerid); //remove o player se nao for da org determinada na variavel la emcima/\//dai tu coloca um sendclientmessage assim vai...........
}
ERROS:
Код:
C:\Users\GABRIEL\Desktop\samp03csvr_R2-2_win32\gamemodes\FBM.pwn(138) : warning 202: number of arguments does not match definition
C:\Users\GABRIEL\Desktop\samp03csvr_R2-2_win32\gamemodes\FBM.pwn(346) : error 055: start of function body without function header
C:\Users\GABRIEL\Desktop\samp03csvr_R2-2_win32\gamemodes\FBM.pwn(347) : error 010: invalid function or declaration
C:\Users\GABRIEL\Desktop\samp03csvr_R2-2_win32\gamemodes\FBM.pwn(349) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: [question] how i creat car -
Hornet600 - 31.03.2011
pawn Код:
command(yourcommand, playerid, params[])
{
if(IsPlayerInVehicle(playerid,taxicar[1])//se tiver no carro "seucarro"
{
if(!Profissao[playerid] == "TAXISTA")
{
RemovePlayerFromVehicle(playerid); //remove o player se nao for da org determinada na variavel la emcima/\//dai tu coloca um sendclientmessage assim vai...........
return 1;
}
else
{
// code goes here
}
}
return 1;
}
Re: [question] how i creat car -
SchurmanCQC - 31.03.2011
OnGameModeinit:
pawn Код:
car = CreateVehicle(411,0,0,0); // unsure the params of createvehicle :p
OnPlayerCommandText:
pawn Код:
if(strcmp(cmdtext, "/yourcommand", true) == 0)
{
if(IsPlayerInVehicle(playerid,car);
{
//code here
}
else
{
//code here
}
return 1;
}
Edit: hornet beat me to it..