Stellet 7 Odesláno: 15. Listopad, 2014 Share Odesláno: 15. Listopad, 2014 public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "TIP: /me [akce]"); new str[128]; GetPlayerName(playerid, str, sizeof(str)); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); SendClientMessageToAll(0xC2A2DAAA, str);//Aby toto šlo jen nějákej kousek odemě vidět v chatu protože když jsem v Palomino Creek aby to nebylo vidět v Dillimore třeba vzdálenost 20 return 1; } return 0; } Příklad je tady if(engine != 1) { engine = 1; SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective); SendClientMessage(playerid, 0xFFFFFFAA, "[CarControl] Nastartoval jsi motor {2F991A}on!"); format(string, sizeof(string), "* %s nastartoval motor auta.", sendername); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } Link to comment Share on other sites More sharing options...
0 Mort 29 Odesláno: 15. Listopad, 2014 Share Odesláno: 15. Listopad, 2014 noa? Link to comment Share on other sites More sharing options...
0 Stellet 7 Odesláno: 15. Listopad, 2014 Author Share Odesláno: 15. Listopad, 2014 noa? Jak udělám aby to nebylo vidět když budu třeba v Palomino Creek a aby to nebylo vidět v LV prostě jen kousek odemě takže dám /me bere pistol a střílí ale aby to neviděli lidi daleko odemě Link to comment Share on other sites More sharing options...
0 Akai 1 Odesláno: 15. Listopad, 2014 Share Odesláno: 15. Listopad, 2014 Nadefinuj si oblasti. new Float:Oblast[][4] = { {minx, miny, maxx, maxy}, //Palomino Creek {minx, miny, maxx, maxy} //Dillimore } #define AREA_PALOMINOCREEK 0 #define AREA_DILLIMORE 1 A zjisti, je-li hráč v dané oblasti. IsPlayerInArea(playerid, areaid) { new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); if(Pos[0] < Oblast[areaid][0] || Pos[1] < Oblast[areaid][1] || Pos[0] > Oblast[areaid][2] || Pos[1] > Oblast[areaid][3]) return false; return true; } Ve tvém příkazu: if(IsPlayerInArea(playerid, AREA_PALOMINOCREEK)) SendClientMessageToAll(0xC2A2DAAA, str); Link to comment Share on other sites More sharing options...
0 Stellet 7 Odesláno: 15. Listopad, 2014 Author Share Odesláno: 15. Listopad, 2014 Nadefinuj si oblasti. new Float:Oblast[][4] = { {minx, miny, maxx, maxy}, //Palomino Creek {minx, miny, maxx, maxy} //Dillimore } #define AREA_PALOMINOCREEK 0 #define AREA_DILLIMORE 1 A zjisti, je-li hráč v dané oblasti. IsPlayerInArea(playerid, areaid) { new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); if(Pos[0] < Oblast[areaid][0] || Pos[1] < Oblast[areaid][1] || Pos[0] > Oblast[areaid][2] || Pos[1] > Oblast[areaid][3]) return false; return true; } Ve tvém příkazu: if(IsPlayerInArea(playerid, AREA_PALOMINOCREEK)) SendClientMessageToAll(0xC2A2DAAA, str); toto nemyslím já chci aby to prostě šlo všude ale šlo to vicět v chatu jen kousek odemě Link to comment Share on other sites More sharing options...
0 Polisek Polismanovic 76 Odesláno: 15. Listopad, 2014 Share Odesláno: 15. Listopad, 2014 Okey Trochu ti napovím: Zjisti si všechno co můžeš o tomhle: Stock: stock ProxDetector Pak by sis mohl zjistit Tutorials A nebo by ti to mohlo dojít Link to comment Share on other sites More sharing options...
0 Akai 1 Odesláno: 15. Listopad, 2014 Share Odesláno: 15. Listopad, 2014 Tak počkej, co vlastně chceš? Aby se zobrazil nějakej text v prostoru na určitym místě v Palomino Creek? Link to comment Share on other sites More sharing options...
0 _HoMeR_ 1 Odesláno: 15. Listopad, 2014 Share Odesláno: 15. Listopad, 2014 On asi myslí, aby ten text videli iba ľudia cca 5 m. od neho. Link to comment Share on other sites More sharing options...
0 Akai 1 Odesláno: 15. Listopad, 2014 Share Odesláno: 15. Listopad, 2014 On asi myslí, aby ten text videli iba ľudia cca 5 m. od neho.Jo tak. Tak v tom případě takhle: public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me { if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "TIP: /me [akce]"); new str[128], Float:Pos[3]; GetPlayerName(playerid, str, sizeof(str)); GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); format(str, sizeof(str), "* %s %s", str, cmdtext[4]); for(new i; i<GetMaxPlayers(); i++) { if(!IsPlayerConnected(i)) continue; if(IsPlayerInRangeOfPoint(i, vzdalenost, Pos[0], Pos[1], Pos[2])) SendClientMessage(i, 0xC2A2DAAA, str); //doplň vzdálenost } return 1; } return 0; } Link to comment Share on other sites More sharing options...
0 VolfikCZ 33 Odesláno: 16. Listopad, 2014 Share Odesláno: 16. Listopad, 2014 http://wiki.sa-mp.com/wiki/SetPlayerChatBubble a co třeba tak tohle použít ? Link to comment Share on other sites More sharing options...
0 Akai 1 Odesláno: 16. Listopad, 2014 Share Odesláno: 16. Listopad, 2014 http://wiki.sa-mp.com/wiki/SetPlayerChatBubble a co třeba tak tohle použít ? To se nezobrazí v globálnim chatu. Link to comment Share on other sites More sharing options...
0 Polisek Polismanovic 76 Odesláno: 16. Listopad, 2014 Share Odesláno: 16. Listopad, 2014 Oba to máte velice sexy.... Ale ted já #include <foreach> #include <zcmd> Stock - Takže asi nahoru nejlépe stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) { SendClientMessage(i,color,string); } } } Přikaz CMD:me(playerid, params[]){ new string[128], akce[100]; if(sscanf(params, "s[100]", akce)) { SendClientMessage(playerid, -1, "INFO: /me [akce]"); return 1; } else { format(string, sizeof(string), "* %s %s", GetName(playerid), akce); ProxDetector(30, playerid, string, FIALOVA); } return 1; } Link to comment Share on other sites More sharing options...
Dotaz
Stellet 7
Link to comment
Share on other sites
11 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now