So.. you're making tutorials and don't know what this error means? lame..
so you wan't help,or won't? , if you won't help , don't write in thread..
Код:
if(ConnectedToPC[playerid] == 255)
{
new idx;
new ReturnUser(temp);
new sendername[MAX_PLAYER_NAME];
new giver[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new string[128];
new giveplayerid;
temp = strtok(stcmp, idx);
if ((strcmp("Contracts",temp, true, strlen(temp)) == 0) && (strlen(temp) == strlen("Contracts")))
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, -1, " Samo hitman rank 4+ moze davati mete !");
return 0;
}
SearchingHit(playerid);
return 0;
}
else if ((strcmp("News", temp, true, strlen(temp)) == 0) && (strlen(temp) == strlen("News")))
{
new x_nr[128];
x_nr = strtok(text, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, -1, "|__________________ Hitman Agencija Vijesti __________________|");
SendClientMessage(playerid, -1, "{168BFF}INFO: {FFFFFF} News [broj] ili News delete [broj] ili News delete all");
format(string, sizeof(string), "1: %s :: Hitman: %s", News[hAdd1], News[hContact1]);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "2: %s :: Hitman: %s", News[hAdd2], News[hContact2]);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "3: %s :: Hitman: %s", News[hAdd3], News[hContact3]);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "4: %s :: Hitman: %s", News[hAdd4], News[hContact4]);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), "5: %s :: Hitman: %s", News[hAdd5], News[hContact5]);
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid, -1, "|________________________________________________________|");
return 0;
}//lets start
if(strcmp(x_nr,"1",true) == 0)
{
if(PlacedNews[playerid] == 1) { SendClientMessage(playerid, -1, " Vec postoji poruka, prvo obrisi!"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, -1, " Moras biti rank 3+ !"); return 0; }
if(News[hTaken1] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, -1, " Tekst prekratak !"); 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, -1, "* Napisao si poruku na Vijesti Hitman Agencije.");
return 0;
}
else
{
SendClientMessage(playerid, -1, " Prvo mjesto vec zauzeto !");
return 0;
}
}
else if(strcmp(x_nr,"2",true) == 0)
{
if(PlacedNews[playerid] == 1) { SCM(playerid, -1, " Vec postoji poruka, prvo obrisi!"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SCM(playerid, -1, " Moras biti rank 3+ !"); return 0; }
if(News[hTaken2] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SCM(playerid, -1, " Text prekratak !"); 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;
SCM(playerid, -1, "* Napisao si poruku na Vijesti Hitman Agencije.");
return 0;
}
else
{
SendClientMessage(playerid, -1, " Drugo mjesto vec zauzeto !");
return 0;
}
}
else if(strcmp(x_nr,"3",true) == 0)
{
if(PlacedNews[playerid] == 1) { SCM(playerid, -1, " Vec postoji poruka, prvo obrisi!"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SCM(playerid, -1, " Moras biti rank 3+ !"); return 0; }
if(News[hTaken3] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SCM(playerid, -1, " Text prekratak !"); 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, -1, "* Napisao si poruku na Vijesti Hitman Agencije.");
return 0;
}
else
{
SendClientMessage(playerid, -1, " Trece mjesto vec zauzeto !");
return 0;
}
}
else if(strcmp(x_nr,"4",true) == 0)
{
if(PlacedNews[playerid] == 1) { SCM(playerid, -1, " Vec postoji poruka, prvo obrisi!"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SCM(playerid, -1, " Moras biti rank 3+ !"); return 0; }
if(News[hTaken4] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, -1, " Text prekratak !"); 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, -1, "* Napisao si poruku na Vijesti Hitman Agencije.");
return 0;
}
else
{
SendClientMessage(playerid, -1, " Cetvrto mjesto vec zauzeto !");
return 0;
}
}
else if(strcmp(x_nr,"5",true) == 0)
{
if(PlacedNews[playerid] == 1) { SCM(playerid, -1, " Vec postoji poruka, prvo obrisi!"); return 0; }
if(PlayerInfo[playerid][pRank] < 3) { SCM(playerid, -1, " Moras biti rank 3+ !"); return 0; }
if(News[hTaken5] == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(strlen(text)-(strlen(x_nr)) < 9) { SendClientMessage(playerid, -1, " Text prekratak !"); 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, -1, "* Napisao si poruku na Vijesti Hitman Agencije.");
return 0;
}
else
{
SendClientMessage(playerid, -1, " Peto mjesto vec zauzeto !");
return 0;
}
}
else if(strcmp(x_nr,"delete",true) == 0)
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, -1, " Moras biti rank 4+ da bi mogao brisati poruke !");
return 0;
}
new string1[MAX_PLAYER_NAME];
new x_tel[128];
x_tel = strtok(text, idx);
if(!strlen(x_tel)) {
SendClientMessage(playerid, -1, "{168BFF}INFO: {FFFFFF} News delete [broj] ili News delete all.");
return 0;
}
if(strcmp(x_tel,"1",true) == 0)
{
format(string, sizeof(string), "Nista"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
SendClientMessage(playerid, -1, "* Obrisao si vijesti na liniji 1 sa Hitman Agencije.");
return 0;
}
else if(strcmp(x_tel,"2",true) == 0)
{
format(string, sizeof(string), "Nista"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
SendClientMessage(playerid, -1, "* Obrisao si vijesti na liniji 2 sa Hitman Agencije.");
return 0;
}
else if(strcmp(x_tel,"3",true) == 0)
{
format(string, sizeof(string), "Nista"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
SendClientMessage(playerid, -1, "* Obrisao si vijesti na liniji 3 sa Hitman Agencije.");
return 0;
}
else if(strcmp(x_tel,"4",true) == 0)
{
format(string, sizeof(string), "Nista"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
SendClientMessage(playerid, -1, "* Obrisao si vijesti na liniji 4 sa Hitman Agencije.");
return 0;
}
else if(strcmp(x_tel,"5",true) == 0)
{
format(string, sizeof(string), "Nista"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
SendClientMessage(playerid, -1, "* Obrisao si vijesti na liniji 5 sa Hitman Agencije.");
return 0;
}
else if(strcmp(x_tel,"all",true) == 0)
{
format(string, sizeof(string), "Nista"); strmid(News[hAdd1], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact1], string1, 0, strlen(string1), 255);
News[hTaken1] = 0;
format(string, sizeof(string), "Nista"); strmid(News[hAdd2], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact2], string1, 0, strlen(string1), 255);
News[hTaken2] = 0;
format(string, sizeof(string), "Nista"); strmid(News[hAdd3], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact3], string1, 0, strlen(string1), 255);
News[hTaken3] = 0;
format(string, sizeof(string), "Nista"); strmid(News[hAdd4], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact4], string1, 0, strlen(string1), 255);
News[hTaken4] = 0;
format(string, sizeof(string), "Nista"); strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "Niko"); strmid(News[hContact5], string1, 0, strlen(string1), 255);
News[hTaken5] = 0;
SendClientMessage(playerid, -1, "* Obrisao si sve vijesti Hitman Agencije.");
return 0;
}
else
{
SendClientMessage(playerid, -1, "{168BFF}INFO: {FFFFFF} News delete [broj] ili News delete all.");
return 0;
}
}
else { return 0; }
}
else if ((strcmp("Givehit", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("Givehit")))
{
if(PlayerInfo[playerid][pRank] < 4)
{
SendClientMessage(playerid, -1, " Moras biti rank 4+ da bi mogao pripisati Hitmanu ucjenu !");
return 0;
}
if(hitfound == 0)
{
SendClientMessage(playerid, -1, " Trenutno nema dostupnih meta, koristi /portable za vise informacija !");
return 0;
}
temp = strtok(text, idx);
if(!strlen(temp))
{
SendClientMessage(playerid, -1, "{168BFF}INFO: {FFFFFF} Givehit {FFFFFF}[ID/DioImena] {FFFFFF}");
return 0;
}
//giveplayerid = strval(temp);
giveplayerid = ReturnUser(temp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pMember] != 9)
{
SendClientMessage(playerid, -1, " Taj igrac nije clan Hitman Agencije !");
return 0;
}
if(GoChase[giveplayerid] < 999)
{
SendClientMessage(playerid, -1, " Taj Hitman vec ima pripisanu metu !");
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, -1, string);
//format(string, sizeof(string), "* Hitman %s has assigned you to kill: %s(ID:%d), for $%d.", sendername, giveplayer, hitid, PlayerInfo[hitid][pValue]);
//SendClientMessage(giveplayerid, -1, string);
format(string, sizeof(string), "* Hitman %s je poslao Hitmana %s da ubije: %s(ID:%d) za $%d.", sendername, giver, giveplayer, hitid, PlayerInfo[hitid][pHeadValue]);
SendFamilyMessage(8, -1, string);
GoChase[giveplayerid] = hitid;
GetChased[hitid] = giveplayerid;
GotHit[hitid] = 1;
hitid = 0;
hitfound = 0;
return 0;
}
else
{
SendClientMessage(playerid, -1, " Taj igrac je offline, koristi /portable za vise informacija i pomoci !");
return 0;
}
}
return 0;
}
else
{
SendClientMessage(playerid, -1, " Taj igrac nije online ili nije Hitman !");
return 0;
}
}
else if ((strcmp("Ranks", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("Ranks")))
{
SendClientMessage(playerid, -1, "|__________________ Rankovi Agencije __________________|");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 9||PlayerInfo[i][pLider] == 9)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* %s: Rank %d", giveplayer,PlayerInfo[i][pRank]);
SendClientMessage(playerid, -1, string);
}
}
}
}
else if ((strcmp("Order", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("Order")))
{
temp = strtok(text, idx);
if ((strcmp("1", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("1")))
{
if(PlayerInfo[playerid][pRank] < 1) { SendClientMessage(playerid, -1, " Nemas dovoljno veliki rank (rank 1+) !"); return 0; }
if(GetPlayerCash(playerid) > 4999)
{
SendClientMessage(playerid, -1, "* Narucio si paket 1 ($5000),dobices uskoro svoju narudzbu.");
OrderReady[playerid] = 1;
return 0;
}
else
{
SendClientMessage(playerid, -1," Ne mozes si to priustiti !");
return 0;
}
}
else if ((strcmp("2", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("2")))
{
if(PlayerInfo[playerid][pRank] < 2) { SendClientMessage(playerid, -1, " Nemas dovoljno veliki rank (rank 2+) !"); return 0; }
if(GetPlayerCash(playerid) > 5999)
{
SendClientMessage(playerid, -1, "* Narucio si paket 2 ($6000),dobices uskoro svoju narudzbu.");
OrderReady[playerid] = 2;
return 0;
}
else
{
SendClientMessage(playerid, -1," Ne mozes si to priustiti !");
return 0;
}
}
else if ((strcmp("3", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("3")))
{
if(PlayerInfo[playerid][pRank] < 2) { SendClientMessage(playerid, -1, " Nemas dovoljno veliki rank (rank 2+) !"); return 0; }
if(GetPlayerCash(playerid) > 5999)
{
SendClientMessage(playerid, -1, "* Narucio si paket 3 ($6000),dobices uskoro svoju narudzbu.");
OrderReady[playerid] = 3;
return 0;
}
else
{
SendClientMessage(playerid, -1," Ne mozes si to priustiti !");
return 0;
}
}
else if ((strcmp("4", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("4")))
{
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, -1, " Nemas dovoljno veliki rank (rank 3+) !"); return 0; }
if(GetPlayerCash(playerid) > 7999)
{
SendClientMessage(playerid, -1, "* Narucio si paket 4 ($255),dobices uskoro svoju narudzbu.");
OrderReady[playerid] = 4;
return 0;
}
else
{
SendClientMessage(playerid, -1," Ne mozes si to priustiti !");
return 0;
}
}
else if ((strcmp("5", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("5")))
{
if(PlayerInfo[playerid][pRank] < 3) { SendClientMessage(playerid, -1, " Nemas dovoljno veliki rank (rank 3+) !"); return 0; }
if(GetPlayerCash(playerid) > 7999)
{
SendClientMessage(playerid, -1, "* Narucio si paket 5 ($255),dobices uskoro svoju narudzbu.");
OrderReady[playerid] = 5;
return 0;
}
else
{
SendClientMessage(playerid, -1," Ne mozes si to priustiti !");
return 0;
}
}
else if ((strcmp("6", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("6")))
{
if(PlayerInfo[playerid][pRank] < 4) { SendClientMessage(playerid, -1, " Nemas dovoljno veliki rank (rank 4+) !"); return 0; }
if(GetPlayerCash(playerid) > 8499)
{
SendClientMessage(playerid, -1, "* Narucio si paket 6 ($8500),dobices uskoro svoju narudzbu.");
OrderReady[playerid] = 6;
return 0;
}
else
{
SendClientMessage(playerid, -1," Ne mozes si to priustiti !");
return 0;
}
}
else if ((strcmp("7", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("7")))
{
if(PlayerInfo[playerid][pRank] < 4) { SendClientMessage(playerid, -1, " Nemas dovoljno veliki rank (rank 4+) !"); return 0; }
if(GetPlayerCash(playerid) > 8499)
{
SendClientMessage(playerid, -1, "* Narucio si paket 7 ($8500),dobices uskoro svoju narudzbu.");
OrderReady[playerid] = 7;
return 0;
}
else
{
SendClientMessage(playerid, -1," Ne mozes si to priustiti !");
return 0;
}
}
else
{
SendClientMessage(playerid, -1, "|__________________ Dostupni Paketi __________________|");
if(PlayerInfo[playerid][pRank] >= 1) { SendClientMessage(playerid, -1, "|(1) ($5000 ) Rank 1 - 5: Knife, Desert Eagle, MP5, Shotgun"); }
if(PlayerInfo[playerid][pRank] >= 2) { SendClientMessage(playerid, -1, "|(2) ($6000 ) Rank 2 - 5: Knife, Desert Eagle, M4, MP5, Shotgun"); }
if(PlayerInfo[playerid][pRank] >= 2) { SendClientMessage(playerid, -1, "|(3) ($6000 ) Rank 2 - 5: Knife, Desert Eagle, AK47, MP5, Shotgun"); }
if(PlayerInfo[playerid][pRank] >= 3) { SendClientMessage(playerid, -1, "|(4) ($255) Rank 3 - 5: Knife, Desert Eagle, M4, MP5, Shotgun, Sniper"); }
if(PlayerInfo[playerid][pRank] >= 3) { SendClientMessage(playerid, -1, "|(5) ($255) Rank 3 - 5: Knife, Desert Eagle, AK47, MP5, Shotgun, Sniper"); }
if(PlayerInfo[playerid][pRank] >= 4) { SendClientMessage(playerid, -1, "|(6) ($8500) Rank 4 - 5: Knife, Desert Eagle, M4, MP5, Shotgun, Sniper"); }
if(PlayerInfo[playerid][pRank] >= 4) { SendClientMessage(playerid, -1, "|(7) ($8500) Rank 4 - 5: Knife, Desert Eagle, AK47, MP5, Shotgun, Sniper"); }
SendClientMessage(playerid, -1, "|________________________________________________________|");
return 0;
}
}
else if ((strcmp("Logout", params, true, strlen(temp)) == 0) && (strlen(temp) == strlen("Logout")))
{
SendClientMessage(playerid, -1, "* Iskljucio si svoj laptop i iskljucio se iz Agencije.");
ConnectedToPC[playerid] = 0;
return 0;
}
else
{
SendClientMessage(playerid, -1, "|___ {555555}Hitman Agencija {FFFFFF}___|");
SendClientMessage(playerid, 0x555555FF, "| - News");
SendClientMessage(playerid, 0x555555FF, "| - Contracts");
SendClientMessage(playerid, 0x555555FF, "| - Givehit");
SendClientMessage(playerid, 0x555555FF, "| - Backup");
SendClientMessage(playerid, 0x555555FF, "| - Order");
SendClientMessage(playerid, 0x555555FF, "| - Ranks");
SendClientMessage(playerid, 0x555555FF, "| - Logout");
SendClientMessage(playerid, 0x555555FF, "|");
SendClientMessage(playerid, -1, "|__________________|");
return 0;
}
return 0;
}