Кто-то мне помогает
#1

Кто-то мне помогает

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
. 
Reply
#2

Судя по всему это предупреждение не связано с этим кодом.
Reply
#3

Quote:
Originally Posted by Stepashka
View Post
Судя по всему это предупреждение не связано с этим кодом.
Я не понял
Reply
#4

Найди переменную SendClientMessage (именно переменную, не вызов функции!) и переименуй. В строке 42795.
Reply
#5

Quote:
Originally Posted by RuanPereira
View Post
Кто-то мне помогает

PHP Code:
SendClientMessageEx(playerid, COLOR_CLIENT, UnloadMsg); 
100% какой-то говно дефайн спижженый с дно-модов/порталов.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)