05.06.2011, 15:19
Hey guys,
I got a problem with entering vehicle.
I've made a stock, that holds the vehicle ID's of the slower cars of the game.
When i enter any vehicle, that isn't between those ID's, i get the message i only should get when i enter those cars above. Anyone could take a look what i did wrong?
~Wesley
I got a problem with entering vehicle.
I've made a stock, that holds the vehicle ID's of the slower cars of the game.
pawn Код:
stock PlayerInLangzaamAuto(playerid)
{
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 405, 406, 408, 410, 413, 414, 418, 422, 423, 436, 455, 458, 466, 474, 479, 482, 483, 499, 507, 516, 524, 526, 527, 531, 540, 543, 546, 547, 551, 572, 585, 605: return 1;
}
return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
if(PlayerInLangzaamAuto(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Slow Car");
return 1;
}
return 1;
}