hey ich hab ein Pickupsystem gemacht welches aber nicht funktioniert
Ich w´ähle das pickup aus aber nix passiert
Woran liegt das ?
Ganze oben
new healpickup,spawnpickup,deaglepickup;
OnPLayerPickUpPickup
if(pickupid == healpickup)
{
SetPlayerHealth(playerid, 100);
}
if(pickupid == spawnpickup)
{
SetPlayerSpawn(playerid);
}
if(pickupid == deaglepickup)
{
GivePlayerWeapon(playerid, 24, 500); // Give playerid a sawn-off shotgun with 64 ammo
}
//
if(strcmp(cmdtext, "/createpickup", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
ShowPlayerDialog(playerid, 9992, DIALOG_STYLE_LIST, "Pickups", "Healpickup\nDeaglepickup\nSpawnpickup\nHealpickup Entfernen\nDeaglepickup Entfernen\nSpawnpickup Entfernen", "Auswählen", "Abbrechen");
}
}
return 1;
}
//
if(dialogid ==9992)
{
if(response)
{
if(listitem==0)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
healpickup = CreatePickup(1240, 0, x, y, z, -1);
}
if(listitem==1)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
deaglepickup = CreatePickup(348, 0, x, y, z, -1);
}
if(listitem==2)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
spawnpickup = CreatePickup(1272, 0, x, y, z, -1);
}
if(listitem==3)
{
DestroyPickup(healpickup);
}
if(listitem==4)
{
DestroyPickup(deaglepickup);
}
if(listitem==5)
{
DestroyPickup(spawnpickup);
}
}
}