pawn Код:
if(ConnectedToPC[playerid] == 255)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("Contracts", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Contracts")))
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar ai nevoie de Rank 4 pentru a utiliza aceasta comanda.");
return 0;
}
SearchingHit(playerid);
return 0;
}
else if ((strcmp("News", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("News")))
{
new x_nr[256];
x_nr = strtok(text, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_GREEN, "{FFFFFF}|---------------------|{FF0000} Hitman Agency News {FFFFFF}|---------------------|{FF0000}");
SendClientMessage(playerid, COLOR_WHITE, "{00A6FF}>>{FFFFFF} Scrie: News [number] sau News delete [number] sau News delete all");
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} 1: %s :: Hitman: %s", News[hAdd1], News[hContact1]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} 2: %s :: Hitman: %s", News[hAdd2], News[hContact2]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} 3: %s :: Hitman: %s", News[hAdd3], News[hContact3]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} 4: %s :: Hitman: %s", News[hAdd4], News[hContact4]);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} 5: %s :: Hitman: %s", News[hAdd5], News[hContact5]);
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_GREEN, "{FFFFFF}|---------------------|{FF0000} Hitman Agency News {FFFFFF}|---------------------|{FF0000}");
return 0;
}//lets start
if(strcmp(x_nr,"1",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ati trimis deja un mesaj, trebuie sa asteptati..."); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar ai nevoie de Rank 3 pentru a utiliza aceasta comanda."); return 0; }
if(News[hTaken1] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Stirea e prea scurta."); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact1], string, 0, strlen(string), 255);
News[hTaken1] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Felicitari, ati adaugat un mesaj nou.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar Spot-ul 1 este deja luat.");
return 0;
}
}
else if(strcmp(x_nr,"2",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ati trimis deja un mesaj, trebuie sa asteptati..."); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar ai nevoie de Rank 3 pentru a utiliza aceasta comanda."); return 0; }
if(News[hTaken2] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Stirea e prea scurta."); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact2], string, 0, strlen(string), 255);
News[hTaken2] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Felicitari, ati adaugat un mesaj nou.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar Spot-ul 2 este deja luat.");
return 0;
}
}
else if(strcmp(x_nr,"3",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ati trimis deja un mesaj, trebuie sa asteptati..."); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar ai nevoie de Rank 3 pentru a utiliza aceasta comanda."); return 0; }
if(News[hTaken3] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Stirea e prea scurta."); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact3], string, 0, strlen(string), 255);
News[hTaken3] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Felicitari, ati adaugat un mesaj nou.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar Spot-ul 3 este deja luat.");
return 0;
}
}
else if(strcmp(x_nr,"4",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ati trimis deja un mesaj, trebuie sa asteptati..."); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar ai nevoie de Rank 3 pentru a utiliza aceasta comanda."); return 0; }
if(News[hTaken4] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Stirea e prea scurta."); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact4], string, 0, strlen(string), 255);
News[hTaken4] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Felicitari, ati adaugat un mesaj nou.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar Spot-ul 4 este deja luat.");
return 0;
}
}
else if(strcmp(x_nr,"5",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ati trimis deja un mesaj, trebuie sa asteptati..."); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar ai nevoie de Rank 3 pentru a utiliza aceasta comanda."); return 0; }
if(News[hTaken5] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Stirea e prea scurta."); return 0; }
format(string, sizeof(string), "%s",right(text,strlen(text)-7)); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s",sendername); strmid(News[hContact5], string, 0, strlen(string), 255);
News[hTaken5] = 1; PlacedNews[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Felicitari, ati adaugat un mesaj nou.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar Spot-ul 5 este deja luat.");
return 0;
}
}
else if(strcmp(x_nr,"delete",true) == 0)
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar trebuie sa ai Rank 4 pentru a utiliza aceasta comanda.");
return 0;
}
new string1[MAX_PLAYER_NAME];
new x_tel[256];
x_tel = strtok(text, idx);
if(!strlen(x_tel)) {
SendClientMessage(playerid, COLOR_WHITE, "{00A6FF}>>{FFFFFF} Scrie: News delete [number] or News delete all.");
return 0;
}
if(strcmp(x_tel,"1",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Mesaj-ul cu numarul 1 a fost sters cu succes.");
return 0;
}
else if(strcmp(x_tel,"2",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Mesaj-ul cu numarul 2 a fost sters cu succes.");
return 0;
}
else if(strcmp(x_tel,"3",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Mesaj-ul cu numarul 3 a fost sters cu succes.");
return 0;
}
else if(strcmp(x_tel,"4",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Mesaj-ul cu numarul 4 a fost sters cu succes.");
return 0;
}
else if(strcmp(x_tel,"5",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Mesaj-ul cu numarul 5 a fost sters cu succes.");
return 0;
}
else if(strcmp(x_tel,"all",true) == 0)
{
format(string, sizeof(string), "Nothing"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
format(string, sizeof(string), "Nothing"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Toate mesajele existente pe canal au fost sterse.");
return 0;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{00A6FF}>>{FFFFFF} Scrie: News delete [number] or News delete all.");
return 0;
}
}
else { return 0; }
}
else if ((strcmp("Givehit", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Givehit")))
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar ai nevoie de Rank 4 pentru a utiliza aceasta comanda.");
return 0;
}
if(hitfound == 0)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar nu exista nici un contract.");
return 0;
}
tmp = strtok(text, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "{00A6FF}>>{FFFFFF} Scrie: Givehit [playerid/PartOfName]");
return 0;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] != 8)
if(PlayerInfo[giveplayerid][pLeader] != 8)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar acel jucator nu este din factiunea Hitman Agency.");
return 0;
}
if(GoChase[giveplayerid] < 999)
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar acest Hitman deja este ocupat cu un alt Contract.");
return 0;
}
if(IsPlayerConnected(hitid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giver, sizeof(giver));
GetPlayerName(hitid, giveplayer, sizeof(giveplayer));
//format(string, sizeof(string), "* You assigned%s to kill: %s(ID:%d), for $%d.", giver, giveplayer, hitid, PlayerInfo[hitid][pValue]);
//SendClientMessage(playerid, COLOR_YELLOW, string);
//format(string, sizeof(string), "* Hitman %s has assigned you to kill: %s(ID:%d), for $%d.", sendername, giveplayer, hitid, PlayerInfo[hitid][pValue]);
format(string, sizeof(string), "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Hitman %s, i-a at un Contract lui %s pe: %s(ID:%d), cu un pret de %d$.", sendername, giver, giveplayer, hitid, PlayerInfo[hitid][pHeadValue]);
SendFamilyMessage(8, COLOR_YELLOW, string);
GoChase[giveplayerid] = hitid;
GetChased[hitid] = giveplayerid;
GotHit[hitid] = 1;
hitid = 0;
hitfound = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Ne pare rau, dar acest jucator care are Contract nu este Online.");
return 0;
}
}
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Acest Hitman nu este Online.");
return 0;
}
}
else if ((strcmp("Ranks", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Ranks")))
{
SendClientMessage(playerid, COLOR_GREEN, "{FFFFFF}|--------|{FF0000} Agency's Ranks {FFFFFF}|--------|{FF0000}");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 8||PlayerInfo[i][pLeader] == 8)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "{00A6FF}>>{FFFFFF} %s: Rank %d", giveplayer,PlayerInfo[i][pRank]);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
}
else if ((strcmp("Logout", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Logout")))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}[{4FD359}Hard2Games{FFFFFF}]: Laptop-ul a fost stins, nu mai esti conectat la agentie");
ConnectedToPC[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "{FFFFFF}|---|{FF0000} Hitman Agency {FFFFFF}|---|{FF0000}");
SendClientMessage(playerid, COLOR_YELLOW2, "{00A6FF}>>{FFFFFF} News");
SendClientMessage(playerid, COLOR_YELLOW2, "{00A6FF}>>{FFFFFF} Contracts");
SendClientMessage(playerid, COLOR_YELLOW2, "{00A6FF}>>{FFFFFF} Givehit");
SendClientMessage(playerid, COLOR_YELLOW2, "{00A6FF}>>{FFFFFF} Backup");
SendClientMessage(playerid, COLOR_YELLOW2, "{00A6FF}>>{FFFFFF} Ranks");
SendClientMessage(playerid, COLOR_YELLOW2, "{00A6FF}>>{FFFFFF} Logout");
SendClientMessage(playerid, COLOR_YELLOW2, "");
SendClientMessage(playerid, COLOR_GREEN, "{FFFFFF}|---|{FF0000} Hitman Agency {FFFFFF}|---|{FF0000}");
return 0;
}
return 0;
}
if(CallLawyer[playerid] == 111)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("da", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("da")))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "** %s este la inchisoare, si are nevoie de avocat. Mergi la politie.", sendername);
SendJobMessage(2, TEAM_AZTECAS_COLOR, string);
SendJobMessage(2, TEAM_AZTECAS_COLOR, "* Cand ajungi la politie intreaba un politist unde este inchisa persoana.");
SendJobMessage(2, TEAM_AZTECAS_COLOR, "* Discuta cu persoana problemele in preajma unui politist,");
SendJobMessage(2, TEAM_AZTECAS_COLOR, "* iar daca politistul este deacord cu eliberarea rugatil sa scrie /accept lawyer.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Un mesaj a fost trimis tuturor avocatilor.");
WantLawyer[playerid] = 0;
CallLawyer[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Nu este nici un avocat disponibil.");
WantLawyer[playerid] = 0;
CallLawyer[playerid] = 0;
return 0;
}
}
if(TalkingLive[playerid] != 255)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pJob] == 6)
{
format(string, sizeof(string), "Reporterul %s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
}
else
{
format(string, sizeof(string), "%s: %s", sendername, text);
OOCNews(COLOR_LIGHTGREEN, string);
}
return 0;
}
Post your whole OnPlayerCommandText callback. There is a problem somewhere with brackets ({}).
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(specplayer, 10, cmdtext);
dcmd(specoff, 7, cmdtext);
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
new idcar = GetPlayerVehicleID(playerid);
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/report", true) == 0 || strcmp(cmd, "/re", true) == 0)
{
if(IsPlayerConnected(playerid))
{
/*if(ReportTimer[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Poti trimite un report la 30 secunde");
return 1;
}*/
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[900];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: (/re)port [text]");
SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: (/re)port doar petru a raporta un haker,bug.Orice abuz este pedepsit cu kick.");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Report [ID:%d]%s: %s", playerid, sendername, (result));
ABroadCast(0xE19898AA,string,1);
//ReportTimer[playerid] = 1;
//SetTimerEx("NewReport", 30000, false, "i", playerid);
SendClientMessage(playerid, 0x96C184AA, " Reportul tau a fost trimis adminilor online. (Daca acest report este un abuz veti primi kick)");
}
return 1;
}
if(strcmp(cmd, "/askq", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[900];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: /askq [text]");
SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: /askq doar daca ai o nedumerire.Orice abuz este pedepsit cu kick.");
return 1;
}
if(PlayerInfo[playerid][pLevel] > 99)
{
SendClientMessage(playerid, COLOR_GRAD2, "Doar cei sub nivel 10 pot pune intrebari.");
return 1;
}
format(string, sizeof(string), "%s(%d) intreaba: %s", sendername, playerid, (result));
ABroadCast(COLOR_ASKQ,string,1);
format(string, sizeof(string), "Intrebarea: %s", (result));
SendClientMessage(playerid, COLOR_ASKQ, string);
format(string, sizeof(string), "%s intreaba: %s *???*", sendername, (result));
printf("%s",string);
}
return 1;
}
if(!strcmp(cmd, "/acte", true))
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "UTILIZEAZA: /acte [IDJucator/PARTEdinNUME]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_WHITE, "Nu poti sa iti arati tie actele");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new vid = GetPlayerVehicleID(playerid);
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
format(string, sizeof(string), "{FFFFFF}|_____________________________ {00FF00}%s{FFFFFF} _____________________________|", sendername);
SendClientMessage(giveplayerid, COLOR_ASKQ, string);
format(string, sizeof(string), "{FFFFFF}Marca: {0000FF}%s {FFFFFF}| Culoare 1/2: {0000FF}%d/%d {FFFFFF}| Numar: {0000FF}%s {FFFFFF}| Proprietar: {0000FF}%s", CarInfo[vid][cDescription],CarInfo[vid][cColorOne],CarInfo[vid][cColorTwo],CarInfo[vid][cNumar],CarInfo[vid][cOwner]);
SendClientMessage(giveplayerid, COLOR_ASKQ, string);
SendClientMessage(giveplayerid, COLOR_ASKQ, "{FFFFFF}|______________________________________________________________|");
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "UTILIZEAZA: /acte [IDJucator/PARTEdinNUME]");
return 1;
}
}
}
if(!strcmp(cmd, "/engine", true))
{
if(IsPlayerConnected(playerid))
{
new name[21];
GetPlayerName(playerid, name, sizeof(name));
if(IsPlayerInAnyVehicle(playerid))
{
if(!engineOn[GetPlayerVehicleID(playerid)])
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(Bicicleta(idcar)||IsAHarvest(idcar))
{
return 1;
}
if(IsAnOwnableCar(idcar))
{
if(PlayerInfo[playerid][pPcarkey1] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey2] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey3] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey4] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey5] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey6] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey7] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey8] == idcar) { }
else { return 1; }
}
if(Gas[idcar] <= 0)
{
SendClientMessage(playerid,COLOR_GRAD1,"Nu ai benzina pentru a porni motorul.");
return 1;
}
if(gEngine[playerid] == 1) { return 1; }
new playerveh = GetPlayerVehicleID(playerid);
PutPlayerInVehicle(playerid, playerveh, 0);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s rasuceste cheia in contact pentru a porni motorul.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetTimerEx("StartingTheVehicle",3500,0,"i",playerid);
GameTextForPlayer(playerid, "~w~Porneste vehiculul...",3500,3);
gEngine[playerid] = 1;
return 1;
}
if(engineOn[GetPlayerVehicleID(playerid)])
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
return 1;
}
if(Bicicleta(idcar)||IsAHarvest(idcar))
{
return 1;
}
if(IsAnOwnableCar(idcar))
{
if(PlayerInfo[playerid][pPcarkey1] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey2] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey3] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey4] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey5] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey6] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey7] == idcar) { }
else if(PlayerInfo[playerid][pPcarkey8] == idcar) { }
else { return 1; }
}
engineOn[GetPlayerVehicleID(playerid)] = false;
//RemovePlayerFromVehicle(playerid);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, -1, -1, -1, -1, -1, -1);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s opreste motorul si ia cheia din contact.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
gEngine[playerid] = 0;
return 1;
}
}
}
return 1;
}