21.08.2010, 20:59
Bom galera eu baixei um FS da arйa inglesa e traduzi pra BR/PT,ele й em LV.Ai quando eu dou /camera [1-8],ele nгo executa nenhum teleporte ou movimento.Alguйm poderia ajudar?
TУPICO ORIGINAL -> https://sampforum.blast.hk/showthread.php?tid=70584
TRADUZIDO:
TУPICO ORIGINAL -> https://sampforum.blast.hk/showthread.php?tid=70584
TRADUZIDO:
Код:
#include <a_samp> #define FILTERSCRIPT #define dcmd(%1,%2,%3) if((strcmp((%3)[1],#%1,true,(%2))==0)&&((((%3)[(%2)+1]==0)&&(dcmd_%1(playerid,"")))||(((%3)[(%2)+1]==32)&&(dcmd_%1(playerid,(%3)[(%2)+2]))))) return 1 #define COL_WHITE 0xFFFFFFAA #define COL_RED 0xE10000AA new bool:CamSpect[MAX_PLAYERS]; forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Sistema de Cameras Los Santos v1.0b "); print("--------------------------------------\n"); return 1; } public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(lvcam, 5, cmdtext); dcmd(lvcamoff, 8, cmdtext); dcmd(lvcaminfo, 9, cmdtext); return 0; } dcmd_lvcam(playerid,params[]) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(10.0, playerid,297.5836,186.4235,1007.1719)) { new LSCamera = strval(params); if(!strlen(params)) {SendClientMessage(playerid,COL_WHITE,"USE: /camera 1-8");} else if(LSCamera < 1 || LSCamera > 8) {SendClientMessage(playerid,COL_WHITE,"USE: /camera 1-8");} else { if(LSCamera == 1) { SetPlayerInterior(playerid,0); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,1538.3915,-1704.8912,21.5166); SetPlayerCameraLookAt(playerid,1531.0133,-1676.2548,12.7782); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 1, Digite /cameraoff para desliga-la."); } else if(LSCamera == 2) { SetPlayerInterior(playerid,0); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,1438.3645,-1734.6554,23.7401); SetPlayerCameraLookAt(playerid,1480.0834,-1733.7463,14.9273); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 2, Digite /cameraoff para desliga-la."); } else if(LSCamera == 3) { SetPlayerInterior(playerid,0); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,1164.0864,-1425.7490,36.9991); SetPlayerCameraLookAt(playerid,1130.5626,-1459.5750,15.2626); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 3, Digite /cameraoff para desliga-la."); } else if(LSCamera == 4) { SetPlayerInterior(playerid,1); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,1912.4845,-1354.6877,28.2232); SetPlayerCameraLookAt(playerid,1885.4146,-1386.7001,14.1831); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 4, Digite /cameraoff para desliga-la."); } else if(LSCamera == 5) { SetPlayerInterior(playerid,0); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,1843.3407,-1261.4116,35.4088); SetPlayerCameraLookAt(playerid,1884.3409,-1226.5309,17.2946); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 5, Digite /cameraoff para desliga-la."); } else if(LSCamera == 6) { SetPlayerInterior(playerid,0); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,2182.7910,-994.9912,73.6713); SetPlayerCameraLookAt(playerid,2155.8044,-1011.0049,62.9646); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 6, Digite /cameraoff para desliga-la."); } else if(LSCamera == 7) { SetPlayerInterior(playerid,10); SetPlayerPos(playerid,492.1340,-1500.7057,20.4830); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,492.1340,-1500.7057,20.4830); SetPlayerCameraLookAt(playerid,479.2881,-1500.3195,20.5017); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 7, Digite /cameraoff para desliga-la."); } else if(LSCamera == 8) { SetPlayerInterior(playerid,0); TogglePlayerControllable(playerid,false); SetPlayerCameraPos(playerid,1464.0081,-1047.1342,28.4574); SetPlayerCameraLookAt(playerid,1464.9038,-1013.5487,28.4574); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк estб monitorando a cвmera 8, Digite /cameraoff para desliga-la."); } CamSpect[playerid]=true; } } else { SendClientMessage(playerid, COL_WHITE, "Vocк nгo estб no Local Certo!"); return 1; } } return 1; } dcmd_lvcamoff(playerid,params[]) { #pragma unused params if(IsPlayerConnected(playerid)) { if(CamSpect[playerid] == false){SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Vocк nгo tem nenhuma cвmera ligada.");} else { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,1689.0211,1450.3179,10.7673); SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid,true); SendClientMessage(playerid,COL_WHITE,"[SISTEMA DE CВMERAS] Cвmera desligada."); CamSpect[playerid]=false; } } return 1; } dcmd_lvcaminfo(playerid,params[]) { #pragma unused params if(IsPlayerConnected(playerid)) { SendClientMessage(playerid,COL_RED,"Sistema de Cameras Los Santos v1.0"); SendClientMessage(playerid,COL_WHITE,"Comandos: /camera 1-8, /cameraoff."); } return 1; }