![]() |
|
[Pawn] bug OnPlayerClickMap - Printable Version +- open.mp forum (https://forum.open.mp) +-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) +--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) +--- Thread: [Pawn] bug OnPlayerClickMap (/showthread.php?tid=3041) |
bug OnPlayerClickMap - mist91631 - 2025-01-18 a public OnPlayerClickMap nao esta retornando o valor das posicao PHP Code: public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
printf("x = %f, y = %f, z = %f", fX, fY, fZ);
if(ModoAdmin[playerid] == true && PlayerData[playerid][admin] > JOGADOR)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), fX, fY, fZ);
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
SendClientMessage(playerid, COR_AZUL, "AdminInfo:{ffffff} Voce foi ate local marcado no mapa!");
}
else
{
SetPlayerPosFindZ(playerid, fX, fY, fZ);
SendClientMessage(playerid, COR_AZUL, "AdminInfo:{ffffff} Voce foi ate local marcado no mapa!");
}
}
return 1;
}
PHP Code: [Info] x = 0.000000, y = 0.000000, z = 22.000000
RE: bug OnPlayerClickMap - samuelmatheus0502 - 2025-01-19 Aqui está funcionando normalmente, verifique se essa condição PHP Code: if(ModoAdmin[playerid] == true && PlayerData[playerid][admin] > JOGADOR)
RE: bug OnPlayerClickMap - samuelmatheus0502 - 2025-01-19 Fiz algumas alterações para meus testes e algumas "melhorias" espero que tenha ajudado! PHP Code: public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
printf("x = %f, y = %f, z = %f", fX, fY, fZ);
if(IsPlayerAdmin(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new car = GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, fX, fY, fZ);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetVehiclePos(car, fX, fY, fZ);
PutPlayerInVehicle(playerid, car, 0);
SendClientMessage(playerid, COLOR_SERVER, "AdminInfo:{ffffff} Voce e seu veículo foi ate local marcado no mapa!");
return 1;
}
else if(!IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid, fX, fY, fZ);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SendClientMessage(playerid, COLOR_SERVER, "AdminInfo:{ffffff} Voce foi ate local marcado no mapa!");
return 1;
}
}
return 0;
}
RE: bug OnPlayerClickMap - mist91631 - 2025-01-21 achei era meu launcher open.mp ta em uma vesao com bugs atualizei a vesao deu certo nao era no codigo e sim no launcher obgd por me ajudar |