15.07.2015, 18:57
PHP код:
if (dialogid == 911)
{
if (response)
{
switch (listitem)
{
case 0:
{
new sendername2[MAX_PLAYER_NAME];
new Car1;
GetPlayerName(playerid, sendername2, sizeof(sendername2));
PlayerInfo[playerid][pCar1] = 0;
PlayerInfo[playerid][pCar2] = 0;
PlayerInfo[playerid][pCar3] = 0;
PlayerInfo[playerid][pCar4] = 0;
for(new i=0; i<MAX_VEHICLES; i++)
{
if(OwnedVeh(i) != 0)
{
if(strmatch(vInfo[OwnedVeh(i)][vOwner], sendername2))
{
if(PlayerInfo[playerid][pCar1] == 0) { PlayerInfo[playerid][pCar1] = i; continue; }
else if(PlayerInfo[playerid][pCar2] == 0) { PlayerInfo[playerid][pCar2] = i; continue; }
else if(PlayerInfo[playerid][pCar3] == 0) { PlayerInfo[playerid][pCar3] = i; continue; }
else if(PlayerInfo[playerid][pCar4] == 0) { PlayerInfo[playerid][pCar4] = i; continue; }
}
}
}
Car1 = PlayerInfo[playerid][pCar1];
SetVehicleZAngle(Car1, 270);
SetVehicleZAngle(Car1, 270);
SetVehiclePos(Car1, 929.7648,-1222.5159,16.7860);
SetVehicleZAngle(Car1, 270);
SetVehicleZAngle(Car1, 270);
PutPlayerInVehicle(playerid, Car1, 0);
GivePlayerMoneyEx(playerid, -7000);
DynamicFactions[7][fBank] += 7000;
}
case 1:
{
new sendername2[MAX_PLAYER_NAME];
new Car2;
GetPlayerName(playerid, sendername2, sizeof(sendername2));
PlayerInfo[playerid][pCar1] = 0;
PlayerInfo[playerid][pCar2] = 0;
PlayerInfo[playerid][pCar3] = 0;
PlayerInfo[playerid][pCar4] = 0;
for(new i=0; i<MAX_VEHICLES; i++)
{
if(OwnedVeh(i) != 0)
{
if(strmatch(vInfo[OwnedVeh(i)][vOwner], sendername2))
{
if(PlayerInfo[playerid][pCar1] == 0) { PlayerInfo[playerid][pCar1] = i; continue; }
else if(PlayerInfo[playerid][pCar2] == 0) { PlayerInfo[playerid][pCar2] = i; continue; }
else if(PlayerInfo[playerid][pCar3] == 0) { PlayerInfo[playerid][pCar3] = i; continue; }
else if(PlayerInfo[playerid][pCar4] == 0) { PlayerInfo[playerid][pCar4] = i; continue; }
}
}
}
Car2 = PlayerInfo[playerid][pCar2];
SetVehicleZAngle(Car2, 270);
SetVehicleZAngle(Car2, 270);
SetVehiclePos(Car2, 929.7648,-1222.5159,16.7860);
SetVehicleZAngle(Car2, 270);
SetVehicleZAngle(Car2, 270);
PutPlayerInVehicle(playerid, Car2, 0);
GivePlayerMoneyEx(playerid, -7000);
DynamicFactions[7][fBank] += 7000;
}
case 2:
{
new sendername2[MAX_PLAYER_NAME];
new Car3;
GetPlayerName(playerid, sendername2, sizeof(sendername2));
PlayerInfo[playerid][pCar1] = 0;
PlayerInfo[playerid][pCar2] = 0;
PlayerInfo[playerid][pCar3] = 0;
PlayerInfo[playerid][pCar4] = 0;
for(new i=0; i<MAX_VEHICLES; i++)
{
if(OwnedVeh(i) != 0)
{
if(strmatch(vInfo[OwnedVeh(i)][vOwner], sendername2))
{
if(PlayerInfo[playerid][pCar1] == 0) { PlayerInfo[playerid][pCar1] = i; continue; }
else if(PlayerInfo[playerid][pCar2] == 0) { PlayerInfo[playerid][pCar2] = i; continue; }
else if(PlayerInfo[playerid][pCar3] == 0) { PlayerInfo[playerid][pCar3] = i; continue; }
else if(PlayerInfo[playerid][pCar4] == 0) { PlayerInfo[playerid][pCar4] = i; continue; }
}
}
}
Car3 = PlayerInfo[playerid][pCar3];
SetVehicleZAngle(Car3, 270);
SetVehicleZAngle(Car3, 270);
SetVehiclePos(Car3, 929.7648,-1222.5159,16.7860);
SetVehicleZAngle(Car3, 270);
SetVehicleZAngle(Car3, 270);
PutPlayerInVehicle(playerid, Car3, 0);
GivePlayerMoneyEx(playerid, -7000);
DynamicFactions[7][fBank] += 7000;
}
case 3:
{
new sendername2[MAX_PLAYER_NAME];
new Car4;
GetPlayerName(playerid, sendername2, sizeof(sendername2));
PlayerInfo[playerid][pCar1] = 0;
PlayerInfo[playerid][pCar2] = 0;
PlayerInfo[playerid][pCar3] = 0;
PlayerInfo[playerid][pCar4] = 0;
for(new i=0; i<MAX_VEHICLES; i++)
{
if(OwnedVeh(i) != 0)
{
if(strmatch(vInfo[OwnedVeh(i)][vOwner], sendername2))
{
if(PlayerInfo[playerid][pCar1] == 0) { PlayerInfo[playerid][pCar1] = i; continue; }
else if(PlayerInfo[playerid][pCar2] == 0) { PlayerInfo[playerid][pCar2] = i; continue; }
else if(PlayerInfo[playerid][pCar3] == 0) { PlayerInfo[playerid][pCar3] = i; continue; }
else if(PlayerInfo[playerid][pCar4] == 0) { PlayerInfo[playerid][pCar4] = i; continue; }
}
}
}
Car4 = PlayerInfo[playerid][pCar4];
SetVehicleZAngle(Car4, 270);
SetVehicleZAngle(Car4, 270);
SetVehiclePos(Car4, 929.7648,-1222.5159,16.7860);
SetVehicleZAngle(Car4, 270);
SetVehicleZAngle(Car4, 270);
PutPlayerInVehicle(playerid, Car4, 0);
GivePlayerMoneyEx(playerid, -7000);
DynamicFactions[7][fBank] += 7000;
}
return 1;
}
}
}