[Pedido] COMANDO /SP /IRP
#1

ALGUEM TEM O COMANDO EM IF AE , DE /SP E /IRP
FUNЗГO: SALVAR POSIЗГO QUEM TIVER PASSE PORFAVOR ? + REP
Reply
#2

No topo do GM:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)