07.03.2012, 12:05
(
Последний раз редактировалось Bogdan1992; 07.03.2012 в 13:13.
)
Hello, here is my event maker. First of all i chose the type of event then the map after map i'll chose the weapon but i don't know why it doesn't work. Here you go. EventInfo[weaponEvent] should be the number introduced into the weapon chose dialog.
And this is the join command.
PHP код:
if(dialogid == 785){ // deathmatch zone
if(response){
strcat(EventInfo[weaponEvent], inputtext);
SendClientMessage(playerid, COLOR_RED, EventInfo[weaponEvent]);
GetPlayerName(playerid, pname, sizeof(pname));
SendClientMessageToAll(COLOR_BLUE, "An admin just started an deathmatch event [/join].");
EventInfo[eventStart] = 1;
}
return 1;
}
if(dialogid == 782){ // deathmatch zone
if(response){
GetPlayerName(playerid, pname, sizeof(pname));
if(listitem == 0){
ShowPlayerDialog(playerid, 785, DIALOG_STYLE_INPUT, "{0000FF}Weapon", "Chose a weapon (put weapon id)","Ok","Close");
}
if(listitem == 1){
ShowPlayerDialog(playerid, 786, DIALOG_STYLE_INPUT, "{0000FF}Weapon", "Chose a weapon (put weapon id)","Ok","Close");
}
if(listitem == 2){
ShowPlayerDialog(playerid, 789, DIALOG_STYLE_INPUT, "{0000FF}Weapon", "Chose a weapon (put weapon id)","Ok","Close");
}
return 1;
}
}
return 1;
}
PHP код:
CMD:join(playerid, params[]){
if(EventInfo[eventStart] == 1){
switch(random(4)){
case 0: SetPlayerPos(playerid, 596.0883,-489.4228,16.3359);
case 1: SetPlayerPos(playerid, 752.3171,-497.8044,17.3281);
case 2: SetPlayerPos(playerid, 696.3105,-645.9007,16.3359);
case 3: SetPlayerPos(playerid, 612.8159,-610.9277,17.2266);
}
GivePlayerWeapon(playerid, EventInfo[weaponEvent], 2000);
SetPlayerArmour(playerid, 100);
SetPlayerVirtualWorld(playerid, 1);
joinEvent[playerid] = 1;
}
return 1;
}