C:\Users\Gabriel\Desktop\area2\sv\gamemodes\kdedrift.pwn(804) : error 017: undefined symbol "PosX" C:\Users\Gabriel\Desktop\area2\sv\gamemodes\kdedrift.pwn(804) : warning 215: expression has no effect C:\Users\Gabriel\Desktop\area2\sv\gamemodes\kdedrift.pwn(804) : error 001: expected token: ";", but found "]" C:\Users\Gabriel\Desktop\area2\sv\gamemodes\kdedrift.pwn(804) : error 029: invalid expression, assumed zero C:\Users\Gabriel\Desktop\area2\sv\gamemodes\kdedrift.pwn(804) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
if (strcmp(cmdtext, "/salvar", true)==0)
{
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
GetPlayerFacingAngle(playerid, PosA[playerid]);
SendClientMessage(playerid, COR, "Vocк guardou a posiзгo use '/irsalvo'!");
PosI[playerid] = (GetPlayerInterior(playerid));
PlayerPlaySound(playerid, 1137 , 0.0, 0.0, 0.0);
return 1;
}
if (strcmp(cmdtext, "/irsalvo", true)==0)
{
if (!floatsqroot(PosX[playerid]+PosY[playerid]+PosZ[playerid]))
{
return SendClientMessage(playerid, COR, "Deve salvar antes!'/salvar'");
}
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, COLOR_ORANGE, "Posiзгo carregada com sucesso!!");
}
return 1;
}
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
if(strcmp(cmd, "/marcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
SendClientMessage(playerid, COLOR_GRAD1, " {FFFFFF}** [{FF0000}AVISO{FFFFFF}]Marca de teleporte feita.");
}
return 1;
}
if(strcmp(cmd, "/irmarca", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
}
SendClientMessage(playerid, COLOR_GRAD1, " {FFFFFF}** [{FF0000}AVISO{FFFFFF}]Teleportado");
SetPlayerInterior(playerid,0);
}
else
}
return 1;
}
//Topo
new kPos[ 5 ];
if( !strcmp( cmdtext, "/salvar", true ) )
{
GetPlayerPos( playerid, kPos[ 0 ], kPos[ 1 ], kPos[ 2 ] );
GetPlayerFacingAngle( playerid, kPos[ 3 ] );
SendClientMessage( playerid, COR, "Vocк guardou a posiзгo use '/irsalvo'!" );
kPos[ 4 ] = ( GetPlayerInterior( playerid ) );
PlayerPlaySound( playerid, 1137 , 0.0, 0.0, 0.0 );
return 1;
}
if( !strcmp( cmdtext, "/irsalvo", true ) )
{
if ( !floatsqroot( kPos[ 0 ] + kPos[ 1 ] + kPos[ 2 ] ) )
{
return SendClientMessage( playerid, COR, "Deve salvar antes!'/salvar'" );
}
else
{
if( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
SetVehiclePos( GetPlayerVehicleID(playerid), kPos[ 0 ], kPos[ 1 ], kPos[ 2 ] );
SetVehicleZAngle( GetPlayerVehicleID( playerid ), kPos[ 3 ] );
SetCameraBehindPlayer( playerid );
LinkVehicleToInterior( GetPlayerVehicleID( playerid ), kPos[ 4 ]) ;
return true;
}
else
{
EnCoche[ playerid ] = false;
SetPlayerPos( playerid, kPos[ 0 ], kPos[ 1 ], kPos[ 2 ] );
SetPlayerFacingAngle( playerid, kPos[ 3 ] );
SetCameraBehindPlayer( playerid );
return true;
}
PlayerPlaySound( playerid, 1085, 0.0, 0.0, 0.0 );
SetPlayerInterior( playerid, kPos[ 4 ] );
SendClientMessage( playerid, COLOR_ORANGE, "Posiзгo carregada com sucesso!!" );
}
return true;
}
Vocк jб perguntou e nуs ja respondemos: https://sampforum.blast.hk/showthread.php?tid=255030
Nгo criei topicos desnecessбrios. |
new Float:PosX[MAX_PLAYERS];
new Float:PosX[MAX_PLAYERS];
new Float:PosY[MAX_PLAYERS];
new Float:PosZ[MAX_PLAYERS];
Jб que vocк queria isso: vocк nгo criou as floats que eram necessбrias. Vocк deveria colocar isto (abaixo) no topo do seu GM.
PHP код:
|
PHP код:
|
PHP код:
|
bonito usar uma int como float.
edit: й obvil meu amigo que vocк precisa usar as vбriaveis caso alguйm use o comando vai redefinir os valores. |