public OnPlayerPickUpPickup(playerid, pickupid){if(pickupid == pickup) { SetPlayerCameraPos(playerid,2028.760009,1351.207885,10.820312); SetPlayerCameraLookAt(playerid,2028.760009,1351.207885,10.820312); pickupidje[playerid] = 1; id[playerid]=0; CreateVehicle(carid[id[playerid]], 2038.045166,1351.679077,10.2887,180.0, 1, 1,90000);// elsõ kocsi } return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ if(pickupidje[playerid] == 1) { new string[256]; if(newkeys == KEY_FIRE) { if(id[playerid] >= 1) { id[playerid]--; format(string,sizeof string,\"%d left\",id[playerid]); SendClientMessage(playerid, -1, string); CreateVehicle(carid[id[playerid]], 2038.045166,1351.679077,10.2887,180.0, 1, 1,90000); } }else if(newkeys == 128) { id[playerid]++; format(string,sizeof string,\"%d right\",id[playerid]); SendClientMessage(playerid, -1, string); CreateVehicle(carid[id[playerid]], 2038.045166,1351.679077,10.2887,180.0, 1, 1,90000);}}return 1;}
new SpawnedVehicle[MAX_PLAYERS];public OnPlayerPickUpPickup(playerid, pickupid){if(pickupid == pickup){SetPlayerCameraPos(playerid,2028.760009,1351.207885,10.820312);SetPlayerCameraLookAt(playerid,2028.760009,1351.207885,10.820312);pickupidje[playerid] = 1;id[playerid]=0;DestroyVehicle(SpawnedVehicle[playerid]);SpawnedVehicle[playerid] = CreateVehicle(carid[id[playerid]], 2038.045166,1351.679077,10.2887,180.0, 1, 1,90000);// elsõ kocsi}return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){if(pickupidje[playerid] == 1){new string[256];if(newkeys == KEY_FIRE){ if(id[playerid] >= 1) { id[playerid]--; format(string,sizeof string,\"%d left\",id[playerid]); SendClientMessage(playerid, -1, string); DestroyVehicle(SpawnedVehicle[playerid]); SpawnedVehicle[playerid] = CreateVehicle(carid[id[playerid]], 2038.045166,1351.679077,10.2887,180.0, 1, 1,90000); } else if(newkeys == 128) { id[playerid]++; format(string,sizeof string,\"%d right\",id[playerid]); SendClientMessage(playerid, -1, string); DestroyVehicle(SpawnedVehicle[playerid]); SpawnedVehicle[playerid] = CreateVehicle(carid[id[playerid]], 2038.045166,1351.679077,10.2887,180.0, 1, 1,90000); }}}return 1;}