07.04.2014, 10:37
I need some help with this, I will show the line which is warning.
All of them have warning, and when i got in the server all them are bug even if it is warning on the code.
Код:
CMD:removegarage(playerid,params[]) { if(PlayerInfo[playerid][pAdmin] >= 1337) return 0; for(new i=0; i < garageCount+1; i++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, gInfo[i][PosX], gInfo[i][PosY], gInfo[i][PosZ])) { format(gInfo[i][Owner],24,"REMOVED"); gInfo[i][Owned] = -999; gInfo[i][Price] = -999; gInfo[i][Interior] = -999; gInfo[i][UID] = -999; gInfo[i][PosX] = -999; gInfo[i][PosY] = -999; gInfo[i][PosZ] = -999; gInfo[i][Locked] = -999; DestroyDynamic3DTextLabel(garageLabel[i]); DestroyDynamicPickup(garagePickup[i]); new path[128]; format(path,sizeof(path),"garages/%d.ini",i); //Format the path with the filenumber dini_Remove(path); SendClientMessage(playerid, COLOR_SUCCESS, "You have removed this garage."); return 1; } } >>> SendClientMessage(playerid, COLOR_ERROR,"Error: You're not near any garage."); return 1; }
Код:
CMD:enterg(playerid,params[]) { for(new i=0; i < garageCount+1; i++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, gInfo[i][PosX], gInfo[i][PosY], gInfo[i][PosZ])) { if(gInfo[i][Locked] == 1 && strcmp(GetPlayerNameEx(playerid),gInfo[i][Owner])) return SendClientMessage(playerid,COLOR_ERROR,"Error: You're not the owner of this garage. It's locked, you can't enter."); new gtype = gInfo[i][Interior]; if(!IsPlayerInAnyVehicle(playerid)) { SetPlayerVirtualWorld(playerid,gInfo[i][UID]); SetPlayerInterior(playerid,floatround(GarageInteriors[gtype][4])); SetPlayerPos(playerid,GarageInteriors[gtype][0],GarageInteriors[gtype][1],GarageInteriors[gtype][2]); lastGarage[playerid] = i; } else { new vid = GetPlayerVehicleID(playerid); LinkVehicleToInterior(vid,floatround(GarageInteriors[gtype][4])); SetVehicleVirtualWorld(vid,gInfo[i][UID]); SetPlayerVirtualWorld(playerid,gInfo[i][UID]); SetPlayerInterior(playerid,floatround(GarageInteriors[gtype][4])); SetVehiclePos(vid,GarageInteriors[gtype][0],GarageInteriors[gtype][1],GarageInteriors[gtype][2]); lastGarage[playerid] = i; } >>>>>>> return 1; } } SendClientMessage(playerid,COLOR_ERROR,"Error: You're not near any garage. "); return 1; }
Код:
CMD:buygarage(playerid, params[]) { for(new i=0; i < garageCount+1; i++) { if(IsPlayerInRangeOfPoint(playerid, 3.0, gInfo[i][PosX], gInfo[i][PosY], gInfo[i][PosZ])) { if(gInfo[i][Owned] == 1) return SendClientMessage(playerid, COLOR_ERROR,"Error: This garage is already owned."); if(GetPlayerMoney(playerid) < gInfo[i][Price]) return SendClientMessage(playerid,COLOR_ERROR,"Error: You don't have enough money to buy this garage."); GivePlayerMoney(playerid,-gInfo[i][Price]); gInfo[i][Price]-= random(5000); //Take some money off of the original price format(gInfo[i][Owner],24,"%s",GetPlayerNameEx(playerid)); gInfo[i][Owned] = 1; Save_Garage(i); UpdateGarageInfo(i); SendClientMessage(playerid,COLOR_SUCCESS,"You have successfully bought this garage."); return 1; } } >>>>>> SendClientMessage(playerid,COLOR_ERROR,"Error: You're not near any garage."); return 1; }