[question] how i creat car
#1

how do i creat a car for a "x" job ?
Reply
#2

new mechaniccar = CreateVehicle

// command
if(isplayerinvehicle(playerid, mechanicar)
{
// your code
}
Reply
#3

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.
Reply
#4

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;
}
Reply
#5

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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)