#include <a_samp>
new Text:text;
public OnFilterScriptInit(){
text = TextDrawCreate(4.000000,450.000000,\"Minden_jarmu_respawnolva\");
TextDrawFont(text,2);
TextDrawColor(text,0xFFFFFFAA);
TextDrawLetterSize(text,0.599999,1.000000);
TextDrawSetOutline(text,1);
TextDrawSetShadow(text,1);
TextDrawSetProportional(text,1);
TextDrawBackgroundColor(text,0x000000ff);
TextDrawTextSize(text, 1, 1);
TextDrawShowForAll(text);
return 1;
}
public OnPlayerConnect(playerid) return TextDrawHideForPlayer(playerid, text);
public OnPlayerCommandText(playerid, cmdtext[]){
if(!strcmp(\"/respawn\", cmdtext, true)){
if(!IsPlayerAdmin(playerid)) return 0; //hanem rcon admin akkor Ismeretlen parancs legyen
SendClientMessage(playerid, 0x99FF00AA, \"Jármûvek Respawnolva!\");
TextDrawShowForAll(text);
for(new cars=0; cars<MAX_VEHICLES; cars++){
if(!VehicleOccupied(cars)){
SetVehicleToRespawn(cars);
}
}
return 1;
}
return 0;
}
stock VehicleOccupied(vehicleid){
for(new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerInVehicle(i,vehicleid)) return 1;
}
return 0;
}
Megfelel?