26.04.2012, 19:32
Ae gente por favor me ajude? eu estou com meu servidor online, mas lб nao tem sistema de salvar posiзao =/ por favor me ajude
new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS], Float:PosA[MAX_PLAYERS], PosI[MAX_PLAYERS], bool:EnCoche[MAX_PLAYERS];
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;}
Hmmmmmm, vocк quer o cуdigo de /sp - Salvar posiзгo | /irp - Ir atй a posiзгo salva?
Simples: Topo do Game-mode: pawn Код:
pawn Код:
|