Код:
#include <a_samp>
#define FILTERSCRIPT
new garageoutsidecars, garagecars, garageoutside, garage, telehouse, teleinhouse;
public OnFilterScriptInit()
{
garageoutsidecars = CreatePickup (1273, 14, 2196.8542,2412.0093,10.8203);
garagecars = CreatePickup (1272, 14, 2172.7998,2416.6609,10.8203, 0);
garageoutside = CreatePickup (1273, 1, 2196.8542,2412.0093,10.8203);
garage = CreatePickup (1272, 1, 2172.7998,2416.6609,10.8203, 0);
telehouse = CreatePickup (1273, 1, 2127.4480,2378.8501,10.8203, 0);
teleinhouse = CreatePickup (1272, 1, 2126.8457,2384.8062,10.8378, 0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == garageoutsidecars)
{
SetPlayerPos (playerid, 2165.5825,2416.3362,10.8203);
if(IsPlayerInAnyVehicle(playerid))
{
new pveh = GetPlayerVehicleID(playerid);
SetVehiclePos(pveh, 2165.5825,2416.3362,10.8203);
PutPlayerInVehicle(pveh, 0);//warning 202: number of arguments does not match definition
}
}
if(pickupid == garagecars)
{
SetPlayerPos (playerid, 2219.7261,2414.9763,10.8125);
if(IsPlayerInAnyVehicle(playerid))
{
new pveh = GetPlayerVehicleID(playerid);
SetVehiclePos(pveh, 2219.7261,2414.9763,10.8125);
PutPlayerInVehicle(pveh, 0);//warning 202: number of arguments does not match definition
}
}
if(pickupid == garage)
{
SetPlayerPos (playerid, 2219.7261,2414.9763,10.8125);
}
if(pickupid == garageoutside)
{
SetPlayerPos (playerid, 2165.5825,2416.3362,10.8203);
}
if(pickupid == telehouse)
{
SetPlayerPos (playerid, 2126.5146,2388.8406,10.8378);
}
if(pickupid == teleinhouse)
{
SetPlayerPos (playerid, 2127.5010,2375.6118,10.8203);
}
return 1;
}
2 Warnings.
What did i do wrong now?
When i try to drive out with the car, the car gets where its supposed to be, but my player ends up on the same place as the car, without being putted in the car, he just stands in the middle of it.