11.02.2014, 16:01
No, but you can make a function that accepts a parameter to do what you want.
What you want, is a way to store function-pointers along with it's parameters.
AFAIK, pawn doesn't handle function pointers.
pawn Код:
CreateSpecialVehicle(Something)
{
switch (Something)
{
case 1: return CreateVehicle(562, 0, 0, 0, 0, -1, -1, 200);
case 2: return CreateVehicle(412, 0, 0, 0, 0, -1, -1, 200);
case 3: return CreateVehicle(592, 0, 0, 0, 0, -1, -1, 200);
case 4: return CreateVehicle(517, 0, 0, 0, 0, -1, -1, 200);
}
return 0;
}
AFAIK, pawn doesn't handle function pointers.