30.05.2016, 19:26
Код:
C:\Users\crввzя\Desktop\satdm\gamemodes\SATDMv12.pwn(89088) : warning 209: function "AC_BS_SetPlayerArmour" should return a value
PHP код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) {
new vehicle = GetPlayerVehicleID(playerid);
if(VehicleInfo[vehicle][Security] == 1) {
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessageToAll(COLOR_ORANGE, "This Vehicle Owner has secured it against players drive but as admin you still can use it");
else if(strcmp(VehicleInfo[vehicle][owner],pName(playerid),false) == 1) {
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z); AC_BS_SetPlayerPos(playerid,x,y,z+2);
return SendClientMessage(playerid, COLOR_BRIGHTRED, "This Vehicle Owner Has Secure it from players drive");
}
}
else if(VehicleInfo[vehicle][Security] == 2) {
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is currently set for admin use only. It will kill anyone who is not an admin.");
else if(PlayerInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid)) {
new string[128];
format(string, sizeof(string), "Server administration has set this %s to kill anyone who try's to drive it...R.I.P loser!",VehicleInfo[GetPlayerVehicleID(playerid)][vName]);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string,sizeof string,"%s just tried to steal an admin only %s and was killed by the security system...R.I.P loser!",pName(playerid));
SendClientMessageToAll(COLOR_ORANGE, string);
AC_BS_SetPlayerHealth(playerid, 0.00);
return AC_BS_SetPlayerArmour(playerid, 0.00); // line warning ( line:89088)
}
}
if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) {
return GameTextForPlayer(playerid, "This vehicle is only temporary and is not for sale!", 3000, 4);
}
/*
Engine System Disabled
new vehicleid = GetPlayerVehicleID(playerid), engine, lights1, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights1, alarm, doors, bonnet, boot, objective);
if(VehicleInfo[vehicleid][owned] == 0 && engine == 0) {
SetVehicleParamsEx(vehicleid,1,lights1,alarm,doors,bonnet,boot,objective);
return VehicleInfo[vehicleid][Engine] = 1;
}
if(VehicleInfo[vehicleid][owned] == 1) SetVehicleParamsEx(vehicleid,VehicleInfo[vehicleid][Engine],lights1,alarm,doors,bonnet,boot,objective);
if(VehicleInfo[vehicleid][owned] == 1 && VehicleInfo[vehicleid][Engine] == 0)
SendClientMessage(playerid,-1,"NOTE: This Vehicle Engine Is Turned off prees N or use /engine command to turn it on!");*/
}