27.01.2012, 23:43
Me ajuda a colocar isso aqui
Aqui dentro
To tentando aqui mais esse return ta me confundindo um pouco
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new carros = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < sizeof(Caminhoneiro); i ++)
{
if(carros == Caminhoneiro[i])
{
if(Empregos[playerid] == CAMINHONEIRO )
{
SendClientMessage(playerid,-1,"Vб atй o CheckPoint para pegar a carga");
SetPlayerCheckpoint(playerid, 1635.424316,1594.583496,10.820312, 8.0);
PegarCarga[playerid] = true;
}
}
}
}
return true;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new car = GetPlayerVehicleID(playerid);//armazena na vбriavel car o carro em q ele estб.
if(newstate == PLAYER_STATE_DRIVER)//se O Player entrar como motorista
{
for(new i = 0; i < sizeof(Caminhoneiro); i ++)
{//realizara um loop na Array cars
if(car == Caminhoneiro[i])
{//se o carro em que vocк estб for igual б algum da array
if(Emprego[playerid] != CAMINHONEIRO)
{//se a profissгo do cara for diferente da citada acima
SendClientMessage(playerid, COR_MARROMCLARO, "[ERRO] Vocк nгo й um caminhoneiro!");
RemovePlayerFromVehicle(playerid);//irб removelo do carro e mandar a mensagem.
}
}
}
}
return true;
}

