17.06.2012, 09:46
Код:
C:\Users\Hellman\Desktop\New folder\pawno\include\/CRP/Publics/OnCommand.pwn(5695) : warning 209: function "cmd_v" should return a value C:\Users\Hellman\Desktop\New folder\pawno\include\/CRP/Publics/OnCommand.pwn(5696) : error 010: invalid function or declaration
pawn Код:
}
else if(!strcmp(x_vehicle, "buygps"))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(sscanf(params,"s[10]", x_vehicle))
{
SendClientMessage(playerid, COLOR_INFO, "USAGE: /v buygps [level]");
SendClientMessage(playerid, COLOR_INFO, "Lvl1: $150");
SendClientMessage(playerid, COLOR_INFO, "Lvl2: $300");
SendClientMessage(playerid, COLOR_INFO, "Lvl3: $450");
SendClientMessage(playerid, COLOR_INFO, "Lvl4: $600");
SendClientMessage(playerid, COLOR_INFO, "Lvl5: $750");
return 1;
}
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, "You don't own this vehicle !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You are not in a vehicle !");
return 1;
}
}
line 5695 }
line 5696} return 1;
}