29.09.2013, 22:37
Como faзo pra trocar veiculos ao passar em uma pickup? tipo icone pra reparar e icone pra trocar veiculo?
public OnPlayerPickUpPickup ( playerid , pickupid )
//No Topo do GM
new Variavel; //Mude esse nome para algum mais adequado.
//Em Algum lugar do GM
Variavel = CreatePickup(...);
//Public OnPlayerPickUpPickup
if (pickupid == Variavel)
{
//Funcoes caso seja :)
}
new Carros[1];
if (pickupid == Variavel)
{
DestroyVehicle(Carros[0]);
Carros[0] = CreateVehicle(522, X, Y, Z, Angulo, Cor1,Cor2,-1);//=== -1 = o respawn -1 nгo respawna
}
C:\Users\Desktop\Df.pwn(7) : error 010: invalid function or declaration
C:\Users\Desktop\Df.pwn(142) : error 017: undefined symbol "Carros"
C:\Users\Desktop\Df.pwn(142) : warning 215: expression has no effect
C:\Users\Desktop\Df.pwn(142) : error 001: expected token: ";", but found "]"
C:\Users\Desktop\Df.pwn(142) : error 029: invalid expression, assumed zero
C:\Users\Desktop\Df.pwn(142) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Carros[10] = CreateVehicle(522, 1958.3783, 1343.1572, 15.3746, 269.1425, +10, -1,-1 ,-1);//=== -1 = o respawn -1 nгo respawna