14.06.2012, 20:28
Cannot upload whole cmd cus is so huge but here is the error
Код:
C:\Users\Hellman\Desktop\New folder\pawno\include\/CRP/Publics/OnCommand.pwn(5683) : warning 209: function "cmd_v" should return a value
pawn Код:
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
new gps;
gps = strval(tmp);
new vehicle = GetPlayerVehicleID(playerid);
if(gps < 1 || gps > 5) { SendClientMessage(playerid, COLOR_INFO, "GPS level can't be below 1 or above 5 !"); return 1; }
if(VehicleInfo[vehicle][vGPS] >= gps) { format(string, sizeof(string), "You already own a GPS level %d or more !", gps); SendClientMessage(playerid, COLOR_LIGHTRED, string); return 1; }
new gpscost = gps*150;
/*if(VehicleInfo[vehicle][vOwned] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You don't own this vehicle");
return 1;
}*/
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
if(VehicleInfo[vehicle][vKey] == PlayerInfo[playerid][pCarKey] || (strcmp(plname, VehicleInfo[vehicle][vOwner], true) == 0))
{
if(GetPlayerCash(playerid) >= gpscost)
{
format(string, sizeof(string), "You have succefully brought GPS level %d for $%d.", gps, gpscost);
SendClientMessage(playerid, COLOR_GREEN, string);
GivePlayerCash(playerid, -gpscost);
VehicleInfo[vehicle][vGPS] = gps;
SaveVehicles(playerid, vehicle);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You can not afford this");
return 1;
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command.");
}
return 1;
}