Problema Admin Chat IC

MichaeelS97

Utente Medio
Autore del topic
23 Febbraio 2012
242
29
Miglior risposta
0
Salve a tutti​
Dato che uso la GameMode arizona e per parlare OOC devo scrivere /b ma io voglio parlare direttamente OOC - IC senza scrivere /b potete passarmi il codice grazie​
@Ardaenus @pieroTHEboss @Michelinu @#KiK
 
Ultima modifica:
Riferimento: Admin Chat IC

Che significa OOC - IC ? :look:

OOC = Out Of Character,cioè chat del gioco,si possono fare xD,:emoji_slight_smile:,:emoji_smiley: ecc
IC = In Character,cioè chat reale,senza xD,:emoji_slight_smile:,:emoji_smiley: ecc
Michael è un codice complesso..potresti fare il sistema nell'onplayertext che se scrive qualche xD,:emoji_slight_smile: e altre smile ti invia il messaggio ooc,senò IC
 
Riferimento: Admin Chat IC

OOC = Out Of Character,cioè chat del gioco,si possono fare xD,:emoji_slight_smile:,:emoji_smiley: ecc
IC = In Character,cioè chat reale,senza xD,:emoji_slight_smile:,:emoji_smiley: ecc
Michael è un codice complesso..potresti fare il sistema nell'onplayertext che se scrive qualche xD,:emoji_slight_smile: e altre smile ti invia il messaggio ooc,senò IC

Complesso? Basta fare un if se è admin e si invia il text senza (( ))

Inviato dal mio Nexus 4 LTE tramite tapatalk 4
 
Riferimento: Admin Chat IC

Complesso? Basta fare un if se è admin e si invia il text senza (( ))

Inviato dal mio Nexus 4 LTE tramite tapatalk 4


Dato che uso la GameMode arizona e per parlare OOC devo scrivere /b ma io voglio parlare direttamente OOC - IC senza scrivere /b potete passarmi il codice grazie
non parla di admin,lui vorrebbe togliere il /b per fare il modo che fa automaticamente o ic o ooc,quindi potrebbe andare come ho detto io no?
 
Riferimento: Admin Chat IC

non parla di admin,lui vorrebbe togliere il /b per fare il modo che fa automaticamente o ic o ooc,quindi potrebbe andare come ho detto io no?

Non so come, ho letto admin.
Comunque, non ho capito che vuoi fare, cioè non ha senso. Il /b è fatto apposta per scrivere OOC. Senza come fai?
Sarebbe un casino, perché devi inserire sempre smile nel messaggio.

Inviato dal mio Nexus 4 LTE tramite tapatalk 4
 
Ultima modifica:
Riferimento: Admin Chat IC

Non so come, ho letto admin.
Comunque, non ho capito che vuoi fare, cioè non ha senso. Il /b è fatto apposta per scrivere OOC. Senza come fai?
Sarebbe un casino, perché devi inserire sempre smile nel messaggio.

Inviato dal mio Nexus 4 LTE tramite tapatalk 4

Se ho capito bene, vuole far in modo, che un Admin in Duty se scrive in IC, il testo viene portato all'OOC.

Ma poi, tutto questo casinò per non scrivere prima /b? :emoji_confused:
 
Riferimento: Admin Chat IC

Se ho capito bene, vuole far in modo, che un Admin in Duty se scrive in IC, il testo viene portato all'OOC.

Ma poi, tutto questo casinò per non scrivere prima /b? :emoji_confused:

Allora è come ho detto io!
Ti basta un if del duty e mandi la text senza (( ))

Inviato dal mio Nexus 4 LTE tramite tapatalk 4
 
Riferimento: Admin Chat IC

@Ardaenus Puoi darmi tu questo codice ? io praticamente non voglio togliere la /b , quanto sono in /aduty invece di scrivere /b voglio parlare direttamente IC , senza star li a scrivere in /b quando ... o pure dimmi come si chiama il codice cerco nella blackshark
 
Riferimento: Admin Chat IC

@Ardaenus Puoi darmi tu questo codice ? io praticamente non voglio togliere la /b , quanto sono in /aduty invece di scrivere /b voglio parlare direttamente IC , senza star li a scrivere in /b quando ... o pure dimmi come si chiama il codice cerco nella blackshark

Mostrami tutto l'OnPlayerText e se possibilmente mi incolli anche il comando goto

Inviato dal mio Nexus 4 LTE tramite tapatalk 4
 
Riferimento: Admin Chat IC

if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USO:] /goto [id/nome]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
GetPlayerPos(plo, plocx, plocy, plocz);
new interior = GetPlayerInterior(plo);
new world = GetPlayerVirtualWorld(plo);

if(PlayerInfo[playerid][pAdmin] >= 1 && AdminDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
format(string, sizeof(string), "[INFO:] Ti sei gotato da %s.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else if(PlayerInfo[playerid][pHelper] == 1 && HelperDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
format(string, sizeof(string), "[INFO:] Ti sei gotato da %s.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "|- Devi essere Aduty per porter utilizzare i comandi -|");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] ID Invalido");
}
}
return 1;
}
if(strcmp(cmd, "/baseadmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -3379.2742,-255.3959,1.3266);
}
else
{
SetPlayerPos(playerid, -3379.2742,-255.3959,1.3266);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/gotobs", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -2249.2837,2341.9839,4.9739);
}
else
{
SetPlayerPos(playerid, -2249.2837,2341.9839,4.9739);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "{F00000}[ERRORE:]{FFFFFF} Non sei Autorizzato a usare questo Comando..");
}
}
return 1;
}
if(strcmp(cmd, "/gotols", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3);
}
else
{
SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/gotolv", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7);
}
else
{
SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/entra", true) == 0)
{
if(PlayerToPoint(8.0, playerid,-2767.8726,788.8099,52.7813))
{
SetPlayerPos(playerid, 1507.3961,-65.3518,980.2591);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
return 1;
}
if(strcmp(cmd, "/esci", true) == 0)
{
if(PlayerToPoint(8.0, playerid,1507.3961,-65.3518,980.2591))
{
SetPlayerPos(playerid, -2767.8726,788.8099,52.7813);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
return 1;
}
if(strcmp(cmd, "/s", true) == 0)
{
if(PlayerToPoint(8.0, playerid,-2468.2515,136.5389,35.1719))
{
SetPlayerPos(playerid, -2465.9570,132.7363,64.9384);
}
else if(PlayerToPoint(8.0, playerid,-2211.9585,1057.6538,80.0131))
{
SetPlayerPos(playerid, -2212.2031,1056.6179,89.7377);
}
else if(PlayerToPoint(8.0, playerid,-2545.1323,990.4798,78.2788))
{
SetPlayerPos(playerid, -2543.0950,991.0842,85.5377);
}
else if(PlayerToPoint(8.0, playerid,-2511.7651,1000.3393,78.3438))
{
SetPlayerPos(playerid, -2513.3821,1004.6329,85.1377);
}
return 1;
}
if(strcmp(cmd, "/g", true) == 0)
{
if(PlayerToPoint(8.0, playerid,-2465.9570,132.7363,64.9384))
{
SetPlayerPos(playerid, -2468.2515,136.5389,35.1719);
}
else if(PlayerToPoint(8.0, playerid,-2212.2031,1056.6179,89.7377))
{
SetPlayerPos(playerid, -2211.9585,1057.6538,80.0131);
}
else if(PlayerToPoint(8.0, playerid,-2543.0950,991.0842,85.5377))
{
SetPlayerPos(playerid, -2545.1323,990.4798,78.2788);
}
else if(PlayerToPoint(8.0, playerid,-2513.3821,1004.6329,85.1377))
{
SetPlayerPos(playerid, -2511.7651,1000.3393,78.3438);
}
return 1;
}
if(strcmp(cmd, "/gotosf", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1417.0,-295.8,14.1);
}
else
{
SetPlayerPos(playerid, -1417.0,-295.8,14.1);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/gotaauto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USO:] /gotaauto [ID Auto]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
SetVehiclePos(plo,plocx,plocy+4, plocz);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERRORE:] Non sei autorizzato ad usare questo comando!");
}
}
return 1;
}
if(strcmp(cmd, "/gethere", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USO:] /gethere [id/nome]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
new interior = GetPlayerInterior(playerid);
new world = GetPlayerVirtualWorld(playerid);

if(PlayerInfo[playerid][pAdmin] >= 1 && AdminDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
format(string, sizeof(string), "[INFO:] Hai gotato %s da te.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else if(PlayerInfo[playerid][pHelper] == 1 && HelperDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
format(string, sizeof(string), "[INFO:] Hai gotato %s da te.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi");
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d non è attivo.", plo);
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
}
}
return 1;
}


public OnPlayerText(playerid, text[])
{
if(WritingPaper[playerid] > 0)
{
new line;
new nstring[256];
new idx;
new length = strlen(text);
while ((idx < length) && (text[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = text[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
if(WritingLine[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "***Digita il tuo titolo di giornale***"); }
else { SendClientMessage(playerid, COLOR_WHITE, "* Inserisci una riga di testo del tuo giornale."); }
return 0;
}
format(nstring, sizeof(nstring), "%s", text);
switch(WritingLine[playerid])
{
case 1:
{
new sendername[MAX_PLAYER_NAME];
new fstring[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(fstring, sizeof(fstring), "%s", sendername);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperMaker], fstring, 0, strlen(fstring), 255);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperTitle], nstring, 0, strlen(nstring), 255);
line = 0; WritingLine[playerid] = 2;
SendClientMessage(playerid, COLOR_LIGHTRED, "* Hai iniziato il tuo giornale, 7 Linee Rimanenti");
}
case 2:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText1], nstring, 0, strlen(nstring), 255);
line = 1; WritingLine[playerid] = 3;
}
case 3:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText2], nstring, 0, strlen(nstring), 255);
line = 2; WritingLine[playerid] = 4;
}
case 4:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText3], nstring, 0, strlen(nstring), 255);
line = 3; WritingLine[playerid] = 5;
}
case 5:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText4], nstring, 0, strlen(nstring), 255);
line = 4; WritingLine[playerid] = 6;
}
case 6:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText5], nstring, 0, strlen(nstring), 255);
line = 5; WritingLine[playerid] = 7;
}
case 7:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText6], nstring, 0, strlen(nstring), 255);
line = 6; WritingLine[playerid] = 8;
}
case 8:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText7], nstring, 0, strlen(nstring), 255);
PaperInfo[WritingPaperNumber[playerid]][PaperUsed] = 1;
SavePapers();
line = 7; WritingLine[playerid] = 0; WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999;
}
}
if(line > 0)
{
format(string, sizeof(string), "* Hai scritto la linea n° %d nel tuo giornale", line);
SendClientMessage(playerid, COLOR_WHITE, string);
if(line == 7)
{
SendClientMessage(playerid, COLOR_WHITE, "* Il giornale è stato aggiunto alla lista notizie.");
}
}
return 0;
}
 
Riferimento: Admin Chat IC

if(strcmp(cmd, "/goto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USO:] /goto [id/nome]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
GetPlayerPos(plo, plocx, plocy, plocz);
new interior = GetPlayerInterior(plo);
new world = GetPlayerVirtualWorld(plo);

if(PlayerInfo[playerid][pAdmin] >= 1 && AdminDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
format(string, sizeof(string), "[INFO:] Ti sei gotato da %s.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else if(PlayerInfo[playerid][pHelper] == 1 && HelperDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(playerid,world);
SetPlayerInterior(playerid,interior);
}
format(string, sizeof(string), "[INFO:] Ti sei gotato da %s.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "|- Devi essere Aduty per porter utilizzare i comandi -|");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] ID Invalido");
}
}
return 1;
}
if(strcmp(cmd, "/baseadmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -3379.2742,-255.3959,1.3266);
}
else
{
SetPlayerPos(playerid, -3379.2742,-255.3959,1.3266);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/gotobs", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -2249.2837,2341.9839,4.9739);
}
else
{
SetPlayerPos(playerid, -2249.2837,2341.9839,4.9739);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "{F00000}[ERRORE:]{FFFFFF} Non sei Autorizzato a usare questo Comando..");
}
}
return 1;
}
if(strcmp(cmd, "/gotols", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3);
}
else
{
SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/gotolv", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7);
}
else
{
SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/entra", true) == 0)
{
if(PlayerToPoint(8.0, playerid,-2767.8726,788.8099,52.7813))
{
SetPlayerPos(playerid, 1507.3961,-65.3518,980.2591);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
return 1;
}
if(strcmp(cmd, "/esci", true) == 0)
{
if(PlayerToPoint(8.0, playerid,1507.3961,-65.3518,980.2591))
{
SetPlayerPos(playerid, -2767.8726,788.8099,52.7813);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
return 1;
}
if(strcmp(cmd, "/s", true) == 0)
{
if(PlayerToPoint(8.0, playerid,-2468.2515,136.5389,35.1719))
{
SetPlayerPos(playerid, -2465.9570,132.7363,64.9384);
}
else if(PlayerToPoint(8.0, playerid,-2211.9585,1057.6538,80.0131))
{
SetPlayerPos(playerid, -2212.2031,1056.6179,89.7377);
}
else if(PlayerToPoint(8.0, playerid,-2545.1323,990.4798,78.2788))
{
SetPlayerPos(playerid, -2543.0950,991.0842,85.5377);
}
else if(PlayerToPoint(8.0, playerid,-2511.7651,1000.3393,78.3438))
{
SetPlayerPos(playerid, -2513.3821,1004.6329,85.1377);
}
return 1;
}
if(strcmp(cmd, "/g", true) == 0)
{
if(PlayerToPoint(8.0, playerid,-2465.9570,132.7363,64.9384))
{
SetPlayerPos(playerid, -2468.2515,136.5389,35.1719);
}
else if(PlayerToPoint(8.0, playerid,-2212.2031,1056.6179,89.7377))
{
SetPlayerPos(playerid, -2211.9585,1057.6538,80.0131);
}
else if(PlayerToPoint(8.0, playerid,-2543.0950,991.0842,85.5377))
{
SetPlayerPos(playerid, -2545.1323,990.4798,78.2788);
}
else if(PlayerToPoint(8.0, playerid,-2513.3821,1004.6329,85.1377))
{
SetPlayerPos(playerid, -2511.7651,1000.3393,78.3438);
}
return 1;
}
if(strcmp(cmd, "/gotosf", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1417.0,-295.8,14.1);
}
else
{
SetPlayerPos(playerid, -1417.0,-295.8,14.1);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non sei un Amministratore o sei livello basso");
}
}
return 1;
}
if(strcmp(cmd, "/gotaauto", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(AdminDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi admin");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USO:] /gotaauto [ID Auto]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
SetVehiclePos(plo,plocx,plocy+4, plocz);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERRORE:] Non sei autorizzato ad usare questo comando!");
}
}
return 1;
}
if(strcmp(cmd, "/gethere", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USO:] /gethere [id/nome]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
GetPlayerPos(playerid, plocx, plocy, plocz);
new interior = GetPlayerInterior(playerid);
new world = GetPlayerVirtualWorld(playerid);

if(PlayerInfo[playerid][pAdmin] >= 1 && AdminDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
format(string, sizeof(string), "[INFO:] Hai gotato %s da te.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else if(PlayerInfo[playerid][pHelper] == 1 && HelperDuty[playerid] == 1)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(plo);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
SetPlayerVirtualWorld(plo,world);
SetPlayerInterior(plo,interior);
}
format(string, sizeof(string), "[INFO:] Hai gotato %s da te.", GetPlayerNameEx(plo));
SendClientMessage(playerid, COLOR_ADMINCMD, string);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Devi essere Aduty per porter utilizzare i comandi");
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d non è attivo.", plo);
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, string);
}
}
return 1;
}


public OnPlayerText(playerid, text[])
{
if(WritingPaper[playerid] > 0)
{
new line;
new nstring[256];
new idx;
new length = strlen(text);
while ((idx < length) && (text[idx] 0)
{
format(string, sizeof(string), "* Hai scritto la linea n° %d nel tuo giornale", line);
SendClientMessage(playerid, COLOR_WHITE, string);
if(line == 7)
{
SendClientMessage(playerid, COLOR_WHITE, "* Il giornale è stato aggiunto alla lista notizie.");
}
}
return 0;
}

Okok ho trovato la condizione. Ora mi serve tutto il public OnPlayerText

Inviato dal mio Nexus 4 LTE tramite tapatalk 4
 
Ultima modifica:
Riferimento: Admin Chat IC

public OnPlayerText(playerid, text[])
{
new string[256];
new tmp[256];
if(strcmp(text, "sa", true) == 0)
{
format(string, sizeof(string), "%s saluta con una stretta di mano e un abbraccio.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0); //shake
return 0;
}
if(strcmp(text, "haha", true) == 0)
{
format(string, sizeof(string), "%s ride di gusto.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
return 0;
}
if(strcmp(text, "omd", true) == 0)
{
format(string, sizeof(string), "%s urla: Oh Mio Dio!!!", GetPlayerNameEx(playerid));
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,1);
SetTimerEx("ChatTimer", 1000, false, "i", playerid);
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
return 0;
}
if(strcmp(text, "cc", true) == 0)
{
format(string, sizeof(string), "%s urla: Che Cazzo?!?!", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,1);
SetTimerEx("ChatTimer", 1000, false, "i", playerid);
return 0;
}
if(strcmp(text, "lol", true) == 0)
{
format(string, sizeof(string), "%s ride ad alta voce.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
return 0;
}
if(strcmp(text, "pm", true) == 0)
{
format(string, sizeof(string), "%s urla: Porca Madonna!!!'", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
return 0;
}
if(strcmp(text, "pd", true) == 0)
{
format(string, sizeof(string), "%s urla: Porco Dio!!!'", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
return 0;
}
if(WritingPaper[playerid] > 0)
{
new line;
new nstring[256];
new idx;
new length = strlen(text);
while ((idx < length) && (text[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = text[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
if(WritingLine[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "***Digita il tuo titolo di giornale***"); }
else { SendClientMessage(playerid, COLOR_WHITE, "* Inserisci una riga di testo del tuo giornale."); }
return 0;
}
format(nstring, sizeof(nstring), "%s", text);
switch(WritingLine[playerid])
{
case 1:
{
new sendername[MAX_PLAYER_NAME];
new fstring[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(fstring, sizeof(fstring), "%s", sendername);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperMaker], fstring, 0, strlen(fstring), 255);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperTitle], nstring, 0, strlen(nstring), 255);
line = 0; WritingLine[playerid] = 2;
SendClientMessage(playerid, COLOR_LIGHTRED, "* Hai iniziato il tuo giornale, 7 Linee Rimanenti");
}
case 2:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText1], nstring, 0, strlen(nstring), 255);
line = 1; WritingLine[playerid] = 3;
}
case 3:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText2], nstring, 0, strlen(nstring), 255);
line = 2; WritingLine[playerid] = 4;
}
case 4:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText3], nstring, 0, strlen(nstring), 255);
line = 3; WritingLine[playerid] = 5;
}
case 5:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText4], nstring, 0, strlen(nstring), 255);
line = 4; WritingLine[playerid] = 6;
}
case 6:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText5], nstring, 0, strlen(nstring), 255);
line = 5; WritingLine[playerid] = 7;
}
case 7:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText6], nstring, 0, strlen(nstring), 255);
line = 6; WritingLine[playerid] = 8;
}
case 8:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText7], nstring, 0, strlen(nstring), 255);
PaperInfo[WritingPaperNumber[playerid]][PaperUsed] = 1;
SavePapers();
line = 7; WritingLine[playerid] = 0; WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999;
}
}
if(line > 0)
{
format(string, sizeof(string), "* Hai scritto la linea n° %d nel tuo giornale", line);
SendClientMessage(playerid, COLOR_WHITE, string);
if(line == 7)
{
SendClientMessage(playerid, COLOR_WHITE, "* Il giornale è stato aggiunto alla lista notizie.");
}
}
return 0;
}
@Ardaenus
 
Riferimento: Admin Chat IC

public OnPlayerText(playerid, text[])
{
new string[256];
new tmp[256];
if(strcmp(text, "sa", true) == 0)
{
format(string, sizeof(string), "%s saluta con una stretta di mano e un abbraccio.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0); //shake
return 0;
}
if(strcmp(text, "haha", true) == 0)
{
format(string, sizeof(string), "%s ride di gusto.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
return 0;
}
if(strcmp(text, "omd", true) == 0)
{
format(string, sizeof(string), "%s urla: Oh Mio Dio!!!", GetPlayerNameEx(playerid));
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,1);
SetTimerEx("ChatTimer", 1000, false, "i", playerid);
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
return 0;
}
if(strcmp(text, "cc", true) == 0)
{
format(string, sizeof(string), "%s urla: Che Cazzo?!?!", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,1);
SetTimerEx("ChatTimer", 1000, false, "i", playerid);
return 0;
}
if(strcmp(text, "lol", true) == 0)
{
format(string, sizeof(string), "%s ride ad alta voce.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
return 0;
}
if(strcmp(text, "pm", true) == 0)
{
format(string, sizeof(string), "%s urla: Porca Madonna!!!'", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
return 0;
}
if(strcmp(text, "pd", true) == 0)
{
format(string, sizeof(string), "%s urla: Porco Dio!!!'", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SetPlayerChatBubble(playerid, text, COLOR_WHITE, 30.0, 7000);
return 0;
}
if(WritingPaper[playerid] > 0)
{
new line;
new nstring[256];
new idx;
new length = strlen(text);
while ((idx < length) && (text[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = text[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
if(WritingLine[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "***Digita il tuo titolo di giornale***"); }
else { SendClientMessage(playerid, COLOR_WHITE, "* Inserisci una riga di testo del tuo giornale."); }
return 0;
}
format(nstring, sizeof(nstring), "%s", text);
switch(WritingLine[playerid])
{
case 1:
{
new sendername[MAX_PLAYER_NAME];
new fstring[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(fstring, sizeof(fstring), "%s", sendername);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperMaker], fstring, 0, strlen(fstring), 255);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperTitle], nstring, 0, strlen(nstring), 255);
line = 0; WritingLine[playerid] = 2;
SendClientMessage(playerid, COLOR_LIGHTRED, "* Hai iniziato il tuo giornale, 7 Linee Rimanenti");
}
case 2:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText1], nstring, 0, strlen(nstring), 255);
line = 1; WritingLine[playerid] = 3;
}
case 3:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText2], nstring, 0, strlen(nstring), 255);
line = 2; WritingLine[playerid] = 4;
}
case 4:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText3], nstring, 0, strlen(nstring), 255);
line = 3; WritingLine[playerid] = 5;
}
case 5:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText4], nstring, 0, strlen(nstring), 255);
line = 4; WritingLine[playerid] = 6;
}
case 6:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText5], nstring, 0, strlen(nstring), 255);
line = 5; WritingLine[playerid] = 7;
}
case 7:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText6], nstring, 0, strlen(nstring), 255);
line = 6; WritingLine[playerid] = 8;
}
case 8:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText7], nstring, 0, strlen(nstring), 255);
PaperInfo[WritingPaperNumber[playerid]][PaperUsed] = 1;
SavePapers();
line = 7; WritingLine[playerid] = 0; WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999;
}
}
if(line > 0)
{
format(string, sizeof(string), "* Hai scritto la linea n° %d nel tuo giornale", line);
SendClientMessage(playerid, COLOR_WHITE, string);
if(line == 7)
{
SendClientMessage(playerid, COLOR_WHITE, "* Il giornale è stato aggiunto alla lista notizie.");
}
}
return 0;
}
@Ardaenus

Ma c'è qualcosa che non va :emoji_confused: sicuro sia l'Arizona? Perché ci manca un po' di roba.

Inviato dal mio Nexus 4 LTE tramite tapatalk 4
 
Riferimento: Admin Chat IC

Si è l'arizona @Ardaenus vedi che puoi fare magari prendi da qualche gm il codice e poi lo provo io se va
 
Riferimento: Admin Chat IC

public OnPlayerText(playerid, text[])
{
new string[256];
new tmp[256];

if(WritingPaper[playerid] > 0)
{
new line;
new nstring[256];
new idx;
new length = strlen(text);
while ((idx < length) && (text[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = text[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
if(WritingLine[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "***Digita il tuo titolo di giornale***"); }
else { SendClientMessage(playerid, COLOR_WHITE, "* Inserisci una riga di testo del tuo giornale."); }
return 0;
}
format(nstring, sizeof(nstring), "%s", text);
switch(WritingLine[playerid])
{
case 1:
{
new sendername[MAX_PLAYER_NAME];
new fstring[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(fstring, sizeof(fstring), "%s", sendername);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperMaker], fstring, 0, strlen(fstring), 255);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperTitle], nstring, 0, strlen(nstring), 255);
line = 0; WritingLine[playerid] = 2;
SendClientMessage(playerid, COLOR_LIGHTRED, "* Hai iniziato il tuo giornale, 7 Linee Rimanenti");
}
case 2:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText1], nstring, 0, strlen(nstring), 255);
line = 1; WritingLine[playerid] = 3;
}
case 3:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText2], nstring, 0, strlen(nstring), 255);
line = 2; WritingLine[playerid] = 4;
}
case 4:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText3], nstring, 0, strlen(nstring), 255);
line = 3; WritingLine[playerid] = 5;
}
case 5:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText4], nstring, 0, strlen(nstring), 255);
line = 4; WritingLine[playerid] = 6;
}
case 6:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText5], nstring, 0, strlen(nstring), 255);
line = 5; WritingLine[playerid] = 7;
}
case 7:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText6], nstring, 0, strlen(nstring), 255);
line = 6; WritingLine[playerid] = 8;
}
case 8:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText7], nstring, 0, strlen(nstring), 255);
PaperInfo[WritingPaperNumber[playerid]][PaperUsed] = 1;
SavePapers();
line = 7; WritingLine[playerid] = 0; WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999;
}
}
if(line > 0)
{
format(string, sizeof(string), "* Hai scritto la linea n° %d nel tuo giornale", line);
SendClientMessage(playerid, COLOR_WHITE, string);
if(line == 7)
{
SendClientMessage(playerid, COLOR_WHITE, "* Il giornale è stato aggiunto alla lista notizie.");
}
}
return 0;
}

@Ardaenus
 
Riferimento: Admin Chat IC

public OnPlayerText(playerid, text[])
{
new string[256];
new tmp[256];

if(WritingPaper[playerid] > 0)
{
new line;
new nstring[256];
new idx;
new length = strlen(text);
while ((idx < length) && (text[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = text[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
if(WritingLine[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "***Digita il tuo titolo di giornale***"); }
else { SendClientMessage(playerid, COLOR_WHITE, "* Inserisci una riga di testo del tuo giornale."); }
return 0;
}
format(nstring, sizeof(nstring), "%s", text);
switch(WritingLine[playerid])
{
case 1:
{
new sendername[MAX_PLAYER_NAME];
new fstring[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(fstring, sizeof(fstring), "%s", sendername);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperMaker], fstring, 0, strlen(fstring), 255);
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperTitle], nstring, 0, strlen(nstring), 255);
line = 0; WritingLine[playerid] = 2;
SendClientMessage(playerid, COLOR_LIGHTRED, "* Hai iniziato il tuo giornale, 7 Linee Rimanenti");
}
case 2:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText1], nstring, 0, strlen(nstring), 255);
line = 1; WritingLine[playerid] = 3;
}
case 3:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText2], nstring, 0, strlen(nstring), 255);
line = 2; WritingLine[playerid] = 4;
}
case 4:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText3], nstring, 0, strlen(nstring), 255);
line = 3; WritingLine[playerid] = 5;
}
case 5:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText4], nstring, 0, strlen(nstring), 255);
line = 4; WritingLine[playerid] = 6;
}
case 6:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText5], nstring, 0, strlen(nstring), 255);
line = 5; WritingLine[playerid] = 7;
}
case 7:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText6], nstring, 0, strlen(nstring), 255);
line = 6; WritingLine[playerid] = 8;
}
case 8:
{
strmid(PaperInfo[WritingPaperNumber[playerid]][PaperText7], nstring, 0, strlen(nstring), 255);
PaperInfo[WritingPaperNumber[playerid]][PaperUsed] = 1;
SavePapers();
line = 7; WritingLine[playerid] = 0; WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999;
}
}
if(line > 0)
{
format(string, sizeof(string), "* Hai scritto la linea n° %d nel tuo giornale", line);
SendClientMessage(playerid, COLOR_WHITE, string);
if(line == 7)
{
SendClientMessage(playerid, COLOR_WHITE, "* Il giornale è stato aggiunto alla lista notizie.");
}
}
return 0;
}

@Ardaenus

Neanche. Ma è troppo strano, mancano tante cose come la maschera.

Inviato dal mio Nexus 4 LTE tramite tapatalk 4