[AJUDA] Comando de salvar posiзao
#9

Quote:
Originally Posted by .Skool_.
Посмотреть сообщение
Hmmmmmm, vocк quer o cуdigo de /sp - Salvar posiзгo | /irp - Ir atй a posiзгo salva?
Simples:

Topo do Game-mode:

pawn Код:
new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS], Float:PosA[MAX_PLAYERS], PosI[MAX_PLAYERS], bool:EnCoche[MAX_PLAYERS];
OnPlayerCommandText

pawn Код:
if (strcmp("/sp", cmdtext, true, 10) == 0){
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
GetPlayerFacingAngle(playerid, PosA[playerid]);
SendClientMessage(playerid, 0xFFFF00AA, "INFO: Posiзгo salva com sucesso, use:  /irp para ir atй a posiзгo salva!");
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, 0xE60000FF, "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, 0xFFFF00AA, "INFO: Posiзгo carregada com sucesso!");}
return 1;}
Espero ter ajudado,
POR ISSU QUE EU TE AMOO MOSГГГГГГГГГГГГГГГГГГГГГГГГO " VAIIIIIIIIIIIIIIIII SKOOL"
Reply


Messages In This Thread
[AJUDA] Comando de salvar posiзao - by jonathan_agv - 26.04.2012, 19:32
Re: [AJUDA] Comando de salvar posiзao - by .FuneraL. - 26.04.2012, 19:33
Re: [AJUDA] Comando de salvar posiзao - by jonathan_agv - 26.04.2012, 19:35
Re: [AJUDA] Comando de salvar posiзao - by jonathan_agv - 26.04.2012, 19:37
Re: [AJUDA] Comando de salvar posiзao - by jonathan_agv - 26.04.2012, 19:40
Re: [AJUDA] Comando de salvar posiзao - by FallenHtz - 26.04.2012, 19:41
Re: [AJUDA] Comando de salvar posiзao - by jonathan_agv - 26.04.2012, 19:42
Re: [AJUDA] Comando de salvar posiзao - by .Skool_. - 26.04.2012, 20:01
Re: [AJUDA] Comando de salvar posiзao - by jonathan_agv - 26.04.2012, 20:03
Re: [AJUDA] Comando de salvar posiзao - by .Skool_. - 26.04.2012, 20:09

Forum Jump:


Users browsing this thread: 1 Guest(s)