27.04.2020, 01:31
(
Last edited by JonathanFeitosa; 28/04/2020 at 01:33 PM.
)
como faзo para ver se o player que esta entrando no veiculo de uma profissao й dessa profissao?
eu fiz isso:
da esses erros
desculpa por estar postando muitos threads no forum й que й a parte que mais tenho dificuldade
eu fiz isso:
PHP Code:
if (GetPlayerVehicleID(playerid) == caminhao[0])
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
if(Player[playerid][Profissao]!=1)
{
ClearAnimations ( playerid ) ;
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COR_VERMELHO,"Vocк nгo й um Caminhoneiro");
}
}
}
PHP Code:
new caminhao[23];
//////////vaiculos
public OnFilterScriptInit()
{
caminhao[0] = CreateVehicle(403, 2778.1956, -2376.8271, 14.1051, 90.0000, 1, 1, 100);
caminhao[1] = CreateVehicle(403, 2759.2173, -2375.7415, 14.1051, -90.1800, 1, 1, 100);
caminhao[2] = CreateVehicle(403, 2759.2842, -2372.0630, 14.1051, -90.0000, 1, 1, 100);
caminhao[3] = CreateVehicle(403, 2759.4177, -2368.5991, 14.1051, -90.0600, 1, 1, 100);
caminhao[4] = CreateVehicle(403, 2759.2805, -2364.9226, 14.1051, -90.0600, 1, 1, 100);
caminhao[5] = CreateVehicle(403, 2759.3254, -2361.0928, 14.1051, -90.0000, 1, 1, 100);
caminhao[6] = CreateVehicle(403, 2759.5269, -2357.4207, 14.1051, -90.0000, 1, 1, 100);
caminhao[7] = CreateVehicle(403, 2759.5083, -2353.4504, 14.1051, -90.2400, 1, 1, 100);
caminhao[8] = CreateVehicle(403, 2759.6807, -2349.3396, 14.1051, -90.0000, 1, 1, 100);
caminhao[9] = CreateVehicle(403, 2759.9221, -2345.4395, 14.1051, -90.0000, 1, 1, 100);
caminhao[10] = CreateVehicle(403, 2759.8955, -2341.3167, 14.1051, -90.0600, 1, 1, 100);
caminhao[11] = CreateVehicle(403, 2760.0535, -2337.0396, 14.1051, -90.0000, 1, 1, 100);
caminhao[12] = CreateVehicle(403, 2759.3333, -2379.2683, 14.1051, -90.0000, 1, 1, 100);
caminhao[13] = CreateVehicle(403, 2778.0913, -2381.0750, 14.1051, 90.0000, 1, 1, 100);
caminhao[14] = CreateVehicle(403, 2777.8953, -2387.4812, 14.1051, 90.0000, 1, 1, 100);
caminhao[15] = CreateVehicle(403, 2777.9941, -2384.3052, 14.1051, 90.0000, 1, 1, 100);
caminhao[16] = CreateVehicle(403, 2777.5559, -2395.3184, 14.1051, 90.0000, 1, 1, 100);
caminhao[17] = CreateVehicle(403, 2777.4539, -2398.8093, 14.1051, 90.0000, 1, 1, 100);
caminhao[18] = CreateVehicle(403, 2777.3525, -2402.2456, 14.1051, 90.0000, 1, 1, 100);
caminhao[19] = CreateVehicle(403, 2777.6592, -2391.8167, 14.1051, 90.0000, 1, 1, 100);
caminhao[20] = CreateVehicle(403, 2775.9270, -2418.2512, 14.1051, 90.0000, 1, 1, 100);
caminhao[21] = CreateVehicle(403, 2774.7324, -2455.2065, 14.1051, 90.0000, 1, 1, 100);
caminhao[22] = CreateVehicle(403, 2774.7046, -2493.5581, 14.1051, 90.0000, 1, 1, 100);
Code:
E:\sampser\gamemodes\rpgm.pwn(500) : error 017: undefined symbol "caminhao" E:\sampser\gamemodes\rpgm.pwn(500) : warning 215: expression has no effect E:\sampser\gamemodes\rpgm.pwn(500) : error 001: expected token: ";", but found "]" E:\sampser\gamemodes\rpgm.pwn(500) : error 029: invalid expression, assumed zero E:\sampser\gamemodes\rpgm.pwn(500) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.