02.07.2014, 01:48
hola amigos aquн pidiendo nuevamente su ayuda.. estoy creando un minijuego DM pero ahora mi problema es, que no me reseta las armas usando ResetPlayerWeapons(playerid); cuando me teletransporto aun sitio que ya definн en la funciуn
aqui el codigo:
muchas gracias saludos
aqui el codigo:
PHP код:
#include <a_samp>
#include <streamer>
#define FILTERSCRIPT
#define batalla 4
#define VERDELIMA 0xB1FF07FF
#pragma tabsize 0
#if defined FILTERSCRIPT
new VariableDeBloqueo[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/ad", true))
{
ShowPlayerDialog(playerid, batalla, DIALOG_STYLE_LIST, "Atakers vs Defensores", "Atakers\nDefensores\n", "Seleccionar", "Cancelar");
return 1;
}
if(strcmp(cmdtext, "/Salirdm", true) == 0)
{
SpawnPlayer(playerid);
VariableDeBloqueo[playerid] = 0;
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid,"~r~~h~Has salido!",3000,3);
return 1;
}
if (strcmp(cmdtext, "/Kill",true,8) == 0||strcmp("/Morir",cmdtext,true)==0)
{
VariableDeBloqueo[playerid] = 0;
SetPlayerHealth(playerid, 0.0);
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == batalla)
{
if(response)
{
if(listitem == 0)
{
SetPlayerArmour(playerid,100); //le da 100 de Chaleco
SetPlayerHealth(playerid,100); //le da 100 de Vida
VariableDeBloqueo[playerid] = 1; //Mini Juego Bloqueo CMD
SetPlayerPos(playerid,2222.1924,-1150.2314,1025.7969);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, 230);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 25, 9999);
SetPlayerInterior(playerid,15);
SetPlayerVirtualWorld(playerid, 3);
}
}
if(listitem == 1)
{
SetPlayerArmour(playerid,100); //le da 100 de Chaleco
SetPlayerHealth(playerid,100); //le da 100 de Vida
VariableDeBloqueo[playerid] = 1; //Mini Juego Bloqueo CMD
SetPlayerPos(playerid,2197.4500,-1142.7198,1029.7969);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid, 285);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 34, 9999);
SetPlayerInterior(playerid,15);
SetPlayerVirtualWorld(playerid, 3);
}
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
VariableDeBloqueo[playerid] = 0;
return 1;
}
#endif
muchas gracias saludos