[Ajuda] Comando Qe Salva Posiзгo e Vai Atй Ela
#1

Olб, Hoje a Pedido De Um Amigo Queria a Ajuda De Vces

Um Comando De Salvar Posiзгo e De Ir Pra Posiзгo Salva

pawn Код:
if (strcmp("/sp", cmdtext, true, 10) == 0){
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
GetPlayerFacingAngle(playerid, PosA[playerid]);
SendClientMessage(playerid, 0x57E427AA, "[INFO]: Sua posiзгo foi salva, para voltar use: /irp");
PosI[playerid] = (GetPlayerInterior(playerid));
PlayerPlaySound(playerid, 1137 , 0.0, 0.0, 0.0);
return 1;
}
if (strcmp("/irp", cmdtext, true, 10) == 0){
if (!floatsqroot(PosX[playerid]+PosY[playerid]+PosZ[playerid]))
{
SendClientMessage(playerid, 0xF60000AA, "[ERRO] Vocк nгo tem nenhuma posiзгo salva.");
}
else
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
SetVehiclePos(GetPlayerVehicleID(playerid), PosX[playerid], PosY[playerid], PosZ[playerid]);
SetVehicleZAngle(GetPlayerVehicleID(playerid), PosA[playerid]);
SetCameraBehindPlayer(playerid);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), PosI[playerid]);
}
 else
{
EnCoche[playerid] = false;
SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
SetPlayerFacingAngle(playerid, PosA[playerid]);
SetCameraBehindPlayer(playerid);
}
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
SetPlayerInterior(playerid, PosI[playerid]);
SendClientMessage(playerid, 0x008040FF, "Vocк se teleportou para a ultima posiзгo salva.");
}
return 1;
}
@EDIT

Obrigado Por Qem AJudar!

+Reput
Reply
#2

Posta O Resto Do Codigo Pros Exsperts Em Pawn Poderem Te Ajudar!!!1111
Reply
#3

Tai Mann
Reply
#4

Ok, mas qual й o problema?
Reply
#5

pawn Код:
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(639) : error 017: undefined symbol "PosX"
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(639) : warning 215: expression has no effect
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(639) : error 001: expected token: ";", but found "]"
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(639) : error 029: invalid expres
Linha:

pawn Код:
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
Reply
#6

Acho que o correto seria:
SetPlayerPos(playerid, Float:PosX[playerid], Float:PosY[playerid], Float:PosZ[playerid]);

E verifique se hб Float: antes de cada variбvel citada acima
Reply
#7

coloca no comeзo do seu GM

pawn Код:
new Float:PosX[MAX_PLAYERS];
Reply
#8

da o mesmo erro na linha
Reply
#9

n deve ser o mesmo erro, deve ser um novo erro, manda ele apenas para confirmar.
Reply
#10

Com a Sua NEW

pawn Код:
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12785) : error 017: undefined symbol "PosY"
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12785) : warning 215: expression has no effect
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12785) : error 001: expected token: ";", but found "]"
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12785) : error 029: invalid expression, assumed zero
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12785) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Sem a Sua NEW

pawn Код:
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12784) : error 017: undefined symbol "PosX"
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12784) : warning 215: expression has no effect
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12784) : error 001: expected token: ";", but found "]"
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12784) : error 029: invalid expression, assumed zero
C:\Arquivos Maninho\• Brasil • [RedBull®] • Free Roam™ • І°№І • 0.3d\gamemodes\RedBull.pwn(12784) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)