Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: #ov3rWhelming poslato Oktobar 15, 2012, 18:57:10 POSLE PODNE

Naslov: [POMOC] /AH i /gmh u dialogu
Poruka od: #ov3rWhelming poslato Oktobar 15, 2012, 18:57:10 POSLE PODNE
Skripta koju koristim: Gf STARI
Detaljan opis problema: novi sam u skriptanju pa želim napravit /ah u dialogu i /gmh
Dio skripte:

if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
SendClientMessage(playerid, COLOR_SKYBLUE,"_______________________________________");
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "*1* MODERATOR *** /check /checkic /setint /mute /kick /cnn /a(dmin) chat");
SendClientMessage(playerid, COLOR_GRAD1, "*1* MODERATOR *** /adminonduty /adminoffduty /eh /recon /banip");
}
if (PlayerInfo[playerid][pAdmin] >= 2)
{
SendClientMessage(playerid, COLOR_GRAD2,"*2* ADMIN *** /skydive /setteam /bigears /cnn /freeze /warn /ban /unfreeze /masked /gotobank /checkcoinfo /rtcbig");
}
if (PlayerInfo[playerid][pAdmin] >= 3)
{
SendClientMessage(playerid, COLOR_GRAD3,"*3* ADMIN *** /noooc /jail /prison /mark /gotomark /gotols /gotoaero");
SendClientMessage(playerid, COLOR_GRAD4,"*3* ADMIN *** /gotolv /gotosf /gethere /gotocar /getcar /weatherall");
}
if (PlayerInfo[playerid][pAdmin] >= 4)
{
    SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /mole /edit /fuelcars /asellhouse /asellbiz /asellsbiz /setcostats");
    SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /sethp /setarmor /givemoney /money(sets money) /setstat");
}
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /weather /makeleader (/orgids) /makeircadmin /tod /setskin /cnnn");
SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /pozornicaup /pozornicadown /pozornicaC/O /event /bizo /fixveh");
}
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
SendClientMessage(playerid, COLOR_GRAD6,"*** 1338 *** Napravi vas nevidljivim na /admins");
SendClientMessage(playerid, COLOR_GRAD6,"*** 1338 *** /givegun /removewarn /houseint /gotoint /update /makegm /drift /givepremium");
SendClientMessage(playerid, COLOR_GRAD6,"** 1338 ** /votes /resetvotes /startvoting /endvoting /setcandidate /delitecandidate");
}
SendClientMessage(playerid, COLOR_SKYBLUE,"_______________________________________");
}
return 1;
}


i /GMH

if(strcmp(cmd, "/gmhelp", true) == 0 || strcmp(cmd, "/gmh", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
if (PlayerInfo[playerid][pGameMaster] >= 1)
{
SendClientMessage(playerid, COLOR_GRAD1,"*1* GAME MASTER *** /a(dmin) chat /gmonduty /gmoffduty /kick /check /gmm /goto [id] /unfreeze");
SendClientMessage(playerid, COLOR_GRAD1,"*1* GAME MASTER *** /gotogrotti /gotoparachute /banip");
}
if (PlayerInfo[playerid][pGameMaster] >= 2)
{
SendClientMessage(playerid, COLOR_GRAD2,"*2* GAME MASTER *** /cnn /gotoevent [1-8] /bigears /setint /gotoaero /gotopizza /gotobank /checkcoinfo");
SendClientMessage(playerid, COLOR_GRAD2,"*2* GAME MASTER *** /recon /rtcbig");
}
if (PlayerInfo[playerid][pGameMaster] >= 3)
{
SendClientMessage(playerid, COLOR_GRAD3,"*3* GAME MASTER *** /gotols /gotosf /gotolv /setteam /freeze /gotobay /gotoarea");
}
if (PlayerInfo[playerid][pGameMaster] >= 4)
{
    SendClientMessage(playerid, COLOR_GRAD4,"*4* GAME MASTER *** /mark /gotomark /entercar /skydive /jail /prison /gethere");
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
return 1;
}



Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Naslov: Odg: [POMOC] /AH i /gmh u dialogu
Poruka od: MEDO poslato Oktobar 15, 2012, 19:34:53 POSLE PODNE
Evo ovako bi trebalo ici

if(strcmp(cmd, "/ahelp", true) == 0 || strcmp(cmd, "/ah", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
ShowPlayerDialog(playerid, 293, DIALOG_STYLE_LIST, "Admin Komande","Moderator(1)\nAdmin(2)\nAdmin(3)\nAdmin(4)\nAdmin(1337)\nAdmin(1338)", "Odaberi", "Izadi");
}
else
{
SendClientMessage(playerid, COLOR_GRAD6, "Admini samo :) ");
}
}
return 1;
}


Onda pod public OnDialogResponse dodas

if(dialogid == 10)
{
if(response)
if(listitem == 0)//Znaci kad ukuca komandu /ah otvori mu se dialog i on klikne na prvi po redu i njega ce mu izbaciti
{
if (PlayerInfo[playerid][pAdmin] >= 1)//Provjerava da li je igrac admin lvl 1 ili je veci lvl admina
SendClientMessage(playerid, COLOR_GRAD1, "*1* MODERATOR *** /check /checkic /setint /mute /kick /cnn /a(dmin) chat");
SendClientMessage(playerid, COLOR_GRAD1, "*1* MODERATOR *** /adminonduty /adminoffduty /eh /recon /banip");
}
}
if(listitem == 1)
{
if (PlayerInfo[playerid][pAdmin] >= 2)//Ako je igrac lvl admin 1 ne moze gledati komande lvl admin 2 i ostale dok ne dobije odreden lvl admina
{
SendClientMessage(playerid, COLOR_GRAD2,"*2* ADMIN *** /skydive /setteam /bigears /cnn /freeze /warn /ban /unfreeze /masked /gotobank /checkcoinfo /rtcbig");
       }
}
if(listitem == 2)
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
SendClientMessage(playerid, COLOR_GRAD3,"*3* ADMIN *** /noooc /jail /prison /mark /gotomark /gotols /gotoaero");
SendClientMessage(playerid, COLOR_GRAD4,"*3* ADMIN *** /gotolv /gotosf /gethere /gotocar /getcar /weatherall");
       }
}
if(lisititem == 3)
{
if (PlayerInfo[playerid][pAdmin] >= 4)
{
SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /mole /edit /fuelcars /asellhouse /asellbiz /asellsbiz /setcostats");
SendClientMessage(playerid, COLOR_GRAD4,"*4* ADMIN *** /sethp /setarmor /givemoney /money(sets money) /setstat");
       }
}
if(listitem == 4)
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /weather /makeleader (/orgids) /makeircadmin /tod /setskin /cnnn");
SendClientMessage(playerid, COLOR_GRAD5,"*** 1337+ *** /pozornicaup /pozornicadown /pozornicaC/O /event /bizo /fixveh");
       }
}
if(listitem == 5)
{
if(PlayerInfo[playerid][pAdmin] >= 1338)
{
SendClientMessage(playerid, COLOR_GRAD6,"*** 1338 *** Napravi vas nevidljivim na /admins");
SendClientMessage(playerid, COLOR_GRAD6,"*** 1338 *** /givegun /removewarn /houseint /gotoint /update /makegm /drift /givepremium");
SendClientMessage(playerid, COLOR_GRAD6,"** 1338 ** /votes /resetvotes /startvoting /endvoting /setcandidate /delitecandidate");
       }
    }
  }
}

Ja ti necu napravit /gmh u dialogu to probaj sam nada m se da si skonto