10.04.2011, 15:02
It doesn't put the player in vehicle, why?
pawn Код:
if(listitem == 1)
{
new rand = random(3);
if(PInfo[playerid][job] != 0) return SendClientMessage(playerid,red,"[ERROR]"lgrey"You already have a job");
SetPlayerSkin(playerid,61);
PInfo[playerid][job] = Pilot;
SetPlayerColor(playerid,0x24F206FF);
if(rand == 0)
{
TogglePlayerDynamicCP(playerid, lsaircp, 1);
SendClientMessage(playerid,red,"[JOB]"lgrey"Your job is to fly to "lgreen"Los Santos Airport");
shamal[0][playerid] = CreateVehicle(519,2019.6594,-2435.7881,14.4657,14.4657,0,0,100000);//lsair
PutPlayerInVehicle(playerid,shamal[2][playerid],0);
}
if(rand == 1)
{
TogglePlayerDynamicCP(playerid, sfaircp, 1);
SendClientMessage(playerid,red,"[JOB]"lgrey"Your job is to fly to "lgreen"San Fierro Airport");
shamal[1][playerid] = CreateVehicle(519,-1700.6638,-405.4533,15.0700,14.4657,0,0,100000);//sfair
PutPlayerInVehicle(playerid,shamal[0][playerid],0);
}
if(rand == 2)
{
TogglePlayerDynamicCP(playerid, lvaircp, 1);
SendClientMessage(playerid,red,"[JOB]"lgrey"Your job is to fly to "lgreen"Las Venturas Airport");
shamal[2][playerid] = CreateVehicle(519,1545.5542,1783.3441,11.7422,14.4657,0,0,100000);//lvair
PutPlayerInVehicle(playerid,shamal[1][playerid],0);
}
}