- 0
Problema amprente.
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Bogdan's
Problema intalnita (descriere): Am gasit un sistem de amprente pe net,e foarte bun doar ca as vrea ca atunci cand X da comanda /getevidence sa ii apara mesajul: Ai gasit niste pete de sange.Acestea apartin lui X,care l-a omorat pe Y.Am incercat sa o fac si eu dar acum imi da de 2 ori acelasi mesaj.
Ero(area / rile) / warning-(ul / urile): Imi dadea 26 de erori
Liniile de cod / sursa / script-ul:
#include <a_samp> #include <foreach> #include <streamer> enum pInfo { pLeader, pMember, }; new PlayerInfo[MAX_PLAYERS][pInfo]; //new Cop[MAX_PLAYERS]; new killer1[MAX_PLAYERS]; new Float:Xa[MAX_PLAYERS]; new Float:Ya[MAX_PLAYERS]; new O[MAX_PLAYERS]; new Float:Za[MAX_PLAYERS]; new Reason[MAX_PLAYERS]; #define COLOR_RED 0xAA3333FF forward IsACop(playerid); public IsACop(playerid) { if(IsPlayerConnected(playerid)) { new leader = PlayerInfo[playerid][pLeader]; new member = PlayerInfo[playerid][pMember]; if(member==1 || member==2 || member==3 || member==4 || member== 5) { return 1; } else if(leader==1 || leader==2 || leader==3 || leader==4 || leader== 5) { return 1; } } return 0; } public OnPlayerDeath(playerid, killerid, reason) { DestroyDynamicObject(O[playerid]); GetPlayerPos(playerid, Xa[playerid], Ya[playerid], Za[playerid]); O[playerid] = CreateDynamicObject(18668, Xa[playerid], Ya[playerid], Za[playerid],0, 0, 274); Create3DTextLabel("**Se poate oberva niste amprente.**",0xAA3333AA,Xa[playerid],Ya[playerid],Za[playerid],40.0,0); killer1[playerid] = killerid; Reason[playerid] = reason; } public OnPlayerCommandText(playerid, cmdtext[]) { new idx; new cmd[128]; cmd = strtok(cmdtext, idx); if(strcmp(cmd, "/getevidence", true) == 0) { if(IsACop(playerid)) { SendClientMessage(playerid, COLOR_RED, "Trebuie sa fi in PD."); return 1; } foreach (Player, i) { new name[128]; new string[100]; //Not sure about this size GetPlayerName(killer1, name, sizeof(name)); format(string, sizeof(string),"Amprente gasite pe numele lui %s , Cauza crimei: Necunoscuta.",name); SendClientMessage(playerid, COLOR_RED, string); DestroyDynamicObject(O[playerid]); } } return 0; } strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; }Imagini / Video (optional): http://s8.postimg.org/wg4mbyeed/sa_mp_004.pngAti incercat sa rezolvati singur?: Da.
3 answers to this question
Recommended Posts