27.09.2017, 13:55
Кто-то мне помогает
предупреждение:
PHP Code:
forward Caminhoneiro_CarregarDesc(playerid);
public Caminhoneiro_CarregarDesc(playerid)
{
switch (PlayerData[playerid][PartedoTrabalho])
{
case 1:
{
new StartLoc[50], EndLoc[50], Load[50], Float:x, Float:y, Float:z, UnloadMsg[100];
PlayerData[playerid][PartedoTrabalho] = 2;
DisablePlayerCheckpoint(playerid);
format(StartLoc, 50, LocalCargaDescarga[PlayerData[playerid][Carregamento]][NomedoLocal]);
format(EndLoc, 50, LocalCargaDescarga[PlayerData[playerid][Descarregamento]][NomedoLocal]);
format(Load, 50, ACargas[PlayerData[playerid][CargaID]][LoadName]);
x = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocX];
y = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocY];
z = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocZ];
SetPlayerCheckpoint(playerid, x, y, z, 7);
TogglePlayerControllable(playerid, 1);
format(UnloadMsg, 100, "Возьмите нагрузку %s в %s.", Load, EndLoc);
SendClientMessageEx(playerid, COLOR_CLIENT, UnloadMsg);
}
case 2:
{
new StartLoc[50], EndLoc[50], Load[50], Name[24];
GetPlayerName(playerid, Name, sizeof(Name));
format(StartLoc, 50, LocalCargaDescarga[PlayerData[playerid][Carregamento]][NomedoLocal]);
format(EndLoc, 50, LocalCargaDescarga[PlayerData[playerid][Descarregamento]][NomedoLocal]);
format(Load, 50, ACargas[PlayerData[playerid][CargaID]][LoadName]);
new Float:x1, Float:y1, Float:x2, Float:y2, Float:Distance, Message[128], Payment;
x1 = LocalCargaDescarga[PlayerData[playerid][Carregamento]][LocX];
y1 = LocalCargaDescarga[PlayerData[playerid][Carregamento]][LocY];
x2 = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocX];
y2 = LocalCargaDescarga[PlayerData[playerid][Descarregamento]][LocY];
Distance = floatsqroot(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));
Payment = floatround((Distance * ACargas[PlayerData[playerid][CargaID]][PayPerUnit]), floatround_floor);
RewardPlayer(playerid, Payment);
format(Message, 128, "Вы завершили поставку и выиграли $%i.", Payment);
PlayerData[playerid][pDentroCaminhao] = 0;
SendClientMessageEx(playerid, COLOR_CLIENT, Message);
TogglePlayerControllable(playerid, 1);
Caminhoneiro_AcabouTrabalho(playerid);
}
}
return 1;
}
PHP Code:
C:\Users\??????\Desktop\??????\gamemodes\??????(42795) : warning 219: local variable "SendClientMessage" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.