20.07.2014, 11:51
Bom galera quando termino o trabalho o nome na barra ainda continua nгo some.
O nome nгo some, alguem poderia me ajudar ?
Se alguйm pudesse me falar se tem algo de errado, Agradeзo desde jб.
O nome nгo some, alguem poderia me ajudar ?
Se alguйm pudesse me falar se tem algo de errado, Agradeзo desde jб.
pawn Код:
enum TPescador
{
PescadorName[50], // Holds the name of the location where the vehicle is located
Float:PescadorX, // Holds the X coordinate where the vehicle spawns
Float:PescadorY, // Holds the Y coordinate where the vehicle spawns
Float:PescadorZ // Holds the Z coordinate where the vehicle spawns
}
new APescador[][TPescador] =
{
{"Peixes", 2355.0051,-3553.0083,-0.5096},
{"Peixes", 3412.3372,-3199.1013,0.0190},
{"Peixes", 3932.1526,-3769.0022,0.2054},
{"Peixes", 3661.7986,-4184.4897,0.2831}
// {"nnnnnnnnnn", xxxxxxx, yyyyyyyy, zzzzzzz},
};
Pescador_StartRandomJob(playerid)
{
new vid;
if (GetPlayerVehicleSeat(playerid) == 0)
{
vid = GetPlayerVehicleID(playerid);
switch (GetVehicleModel(vid))
{
case VehicleReefer:
{
new Float:x, Float:y, Float:z;
APlayerData[playerid][JobStarted] = true;
APlayerData[playerid][JobID] = 2;
APlayerData[playerid][JobLoc1] = random(sizeof(APescador));
APlayerData[playerid][JobStep] = 1;
new STR[1000];
format(STR, 1000, "{a9c4e4}Vocк tem que ir pescar {FFFFFF}%s{a9c4e4}.", APescador[APlayerData[playerid][JobLoc1]][PescadorName]);
SendClientMessage(playerid, 0x33FF33AA, STR);
format(STR, 1000, TXT_DeixarPeixes, APescador[APlayerData[playerid][JobLoc1]][PescadorName]);
TextDrawSetString(Trapo[playerid], TXT_DeixarPeixes);
x = APescador[APlayerData[playerid][JobLoc1]][PescadorX];
y = APescador[APlayerData[playerid][JobLoc1]][PescadorY];
z = APescador[APlayerData[playerid][JobLoc1]][PescadorZ];
SetPlayerCheckpoint(playerid, x, y, z, 10.0);
APlayerData[playerid][VehicleID] = vid;
APlayerData[playerid][VehicleTimerTime] = Job_TimeToFailMission;
}
}
}
return 1;
}
Pescador_EnterCheckpoint(playerid)
{
if (APlayerData[playerid][JobID] == 2)
{
if (GetPlayerVehicleID(playerid) == APlayerData[playerid][VehicleID])
{
switch (APlayerData[playerid][JobStep])
{
case 1:
{
AVehicleData[APlayerData[playerid][LoadID]][Owned] = false;
APlayerData[playerid][LoadID] = 0;
APlayerData[playerid][JobID] = 2;
APlayerData[playerid][JobLoc1] = random(sizeof(AFogos));
APlayerData[playerid][JobStep] = 1;
TogglePlayerControllable(playerid, 0);
SetTimerEx("DCongelarxdpesca", 1000*3, false, "i", playerid);
GameTextForPlayer(playerid,"pescando..", 3000, 5);
PlayerFile_Save(playerid);
}
}
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк tem que estar dentro do barco de pescadores para iniciar um trabalho.");
}
return 1;
}
forward DCongelarxdpesca(playerid);
public DCongelarxdpesca(playerid)
{
Pescador_EndJob(playerid);
RewardPlayer(playerid, 0, 1);
RewardPlayer(playerid, 5500, 0);
SetPVarInt(playerid, "PVarGold", 20);
TogglePlayerControllable(playerid, 1);
new Name[24], Msg[1000];
GetPlayerName(playerid, Name, sizeof(Name));
format(Msg, 1000, TXT_PescadorFimdoTrabalho, Name, APescador[APlayerData[playerid][JobLoc1]][PescadorName]);
SendClientMessageToAll(0xFFFFFFFF, Msg);
SendClientMessage(playerid, 0xFFFFFFFF, "{a9c4e4}Vocк ganhou R${ffffff}5500 + 1 {a9c4e4}score por ter pescado.");
SendClientMessage(playerid, 0xFFFFFFFF, "{a9c4e4}Vocк ganhou {ffffff}20 {a9c4e4}golds por ter pescado.");
return 1;
}
Pescador_EndJob(playerid)
{
if (APlayerData[playerid][JobStarted] == true)
{
APlayerData[playerid][JobStarted] = false;
APlayerData[playerid][JobStep] = 0;
APlayerData[playerid][JobID] = 0;
APlayerData[playerid][VehicleTimerTime] = 0;
APlayerData[playerid][VehicleID] = 0;
APlayerData[playerid][JobLoc1] = 0;
APlayerData[playerid][JobLoc2] = 0;
if (APlayerData[playerid][LoadID] != 0)
{
APlayerData[playerid][LoadID] = 0;
}
DisablePlayerCheckpoint(playerid);
DisablePlayerRaceCheckpoint(playerid);
TextDrawSetString(APlayerData[playerid][MissionText], Pescador_NoJobText);
KillTimer(APlayerData[playerid][LoadingTimer]);
}
return 1;
}