30.11.2018, 08:45
You can write your hole code like this:
That makes it a lot easier.
That makes it a lot easier.
Код:
stock CarOwner3(playerid, vehicleid) { for(new i,idx; i<10; i++) { idx = PlayerInfo[playerid][pCarPers][i]; if(idx != -1 && vehicleid == CarInfo[idx][cSpawn]) return 1; } return 0; } CMD:park(playerid, params[]) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "You are not in your personal vehicle!"); new getcarid = GetPlayerVehicleID(playerid); if(CarOwner3(playerid, getcarid)) // checking whether the player is in the personal car { PersonalCars(playerid, 2, getcarid); // In personal vehicle } else { SCM(playerid, -1, "[Personal Car's]: You are not in your personal vehicle!"); } return 1; }