public OnPlayerCommandText(playerid, cmdtext[]){ if(!strcmp(cmdtext,\"/nyilat\",true)) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,\"Kocsiban kell lened!.\"); SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),playerid,1,0); return 1; } return 0;}
public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/car-target-on\", true) == 0) {new VehicleID;if(IsPlayerInAnyVehicle(playerid)) {VehicleID = GetPlayerVehicleID(playerid);new i; for(i=0;i<=MAX_PLAYERS;i++) { if(i != playerid) { SetVehicleParamsForPlayer(VehicleID,i, 1, 0); SetVehicleParamsForPlayer(VehicleID,playerid, 1, 0); } }}else{SendClientMessage(playerid, COLOR_RED, \"Nem vagy kocsiban!!!\");}return 1;}if(strcmp(cmdtext, \"/car-target-off\", true) == 0) {new VehicleID;if(IsPlayerInAnyVehicle(playerid)) {VehicleID = GetPlayerVehicleID(playerid);new i; for(i=0;i<=MAX_PLAYERS;i++) { if(i != playerid) { SetVehicleParamsForPlayer(VehicleID,i, 0, 0); SetVehicleParamsForPlayer(VehicleID,playerid, 0, 0); } }}else{SendClientMessage(playerid, COLOR_RED, \"Nem vagy kocsiban!!!\");}return 1;} return 0;}
Note: You will have to respawn the vehicle to properly remove the objective.Note: From 0.3 you will have to re-apply this function when OnVehicleStreamIn is called![/quote]
lambo96[]\" post=\"98924\" timestamp=\"1292935806\"]Én olyanra gondoltam hogy a kocsi egy helyben áll és villog felette egy nyíl amikor beszáll valaki akkor is ott marad a nyíl és a kocsi mozgásával együtt mozog [/quote]Errõl beszélünk...
public OnPlayerCommandText(playerid, cmdtext[]){ new VehicleID = GetPlayerVehicleID(playerid);if(strcmp(cmdtext, \"/car-target-on\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { for(new i=0;i<=MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(VehicleID,i, 1, 0); } }else return SendClientMessage(playerid, COLOR_RED, \"Nem vagy kocsiban!!!\"); return 1; } if(strcmp(cmdtext, \"/car-target-off\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { for(new i=0;i<=MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(VehicleID,i, 0, 0); } } else return SendClientMessage(playerid, COLOR_RED, \"Nem vagy kocsiban!!!\"); return 1; } return 0;}
Ez pont olyan.@.:Secur:. : Felesleges mindenkire rajtad kívül, aztán rád is beállítani, szoval röviden.. public OnPlayerCommandText(playerid, cmdtext[]){ new VehicleID = GetPlayerVehicleID(playerid);if(strcmp(cmdtext, \"/car-target-on\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { for(new i=0;i<=MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(VehicleID,i, 1, 0); } }else return SendClientMessage(playerid, COLOR_RED, \"Nem vagy kocsiban!!!\"); return 1; } if(strcmp(cmdtext, \"/car-target-off\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { for(new i=0;i<=MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(VehicleID,i, 0, 0); } } else return SendClientMessage(playerid, COLOR_RED, \"Nem vagy kocsiban!!!\"); return 1; } return 0;}