14.04.2012, 19:07
Aqui estб o CODE:
Nгo estбs a funcionar bem, teleporta apenas o Motorista, e nгo teleporta o resto que esta no Veнculo, ajudem por favor
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
SetPlayerPos(playerid, COORDENADASGARAGEM);
SetPlayerVirtualWorld(playerid, g+10);
format(string, sizeof(string), "Bem Vindo a Garagem %d.", g);
SendClientMessage(playerid, COR_SUCESSO, string);
}
else
{
if(Garagem[g][cnCar] <= MAX_CARS)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new tmpcar = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(i, tmpcar))
{
SetPlayerVirtualWorld(i, g+10);
SetVehicleVirtualWorld(tmpcar, g+10);
SetVehiclePos(tmpcar, COORDENADASGARAGEM);
PutPlayerInEmptySeat(tmpcar, i);
Garagem[g][cnCar] ++;
format(string, sizeof(string), "Bem Vindo a Garagem %d.", g);
SendClientMessage(i, COR_SUCESSO, string);
}
}
}
}
else
{
SendClientMessage(playerid, COR_ERRO, "Jб tem 2 Veнculos dentro desta Garagem.");
}
}