Ich will gungame(waffenspiel) scripten aber nach dem man stirbt bekommt man keine Waffen, ich habe auch keine Ahnung wieso
OnPlayerSpawn
else if(dm[5][playerid] == 1)
{
new Random = random(sizeof(dmspawn));
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,dmspawn[Random][0],dmspawn[Random][1],dmspawn[Random][2]);
switch(gunstreak[playerid])
{
case 1:
{
GivePlayerWeapon(playerid,23,1339);
gunstreak[playerid] = 1;
}
case 2:
{
GivePlayerWeapon(playerid,32,1339);
gunstreak[playerid] = 2;
}
case 3:
{
GivePlayerWeapon(playerid,25,1339);
gunstreak[playerid] = 3;
}
case 4:
{
GivePlayerWeapon(playerid,4,1);
gunstreak[playerid] = 3;
}
}
}
//OnPlayerDeath
//gungame
gunstreak[killerid] +=1;
gunstreak[playerid] --;
switch(gunstreak[killerid])
{
case 1:
{
GivePlayerWeapon(playerid,32,1337);
gunstreak[killerid] = 1;
}
case 2:
{
GivePlayerWeapon(playerid,29,1337);
gunstreak[killerid] = 2;
}
case 3:
{
GivePlayerWeapon(playerid,25,1337);
gunstreak[killerid] = 3;
}
case 4:
{
GivePlayerWeapon(playerid,4,1);
gunstreak[killerid] = 4;
}
case 5:
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(dm[5][i] == 1)
{
SpawnPlayer(i);
gunstreak[i] = 0;
gungameclose = 0;
dm[5][i] = 0;
Map[i] = 0;
SendClientMessage(playerid,SERVER,"[SERVER] Die Runde ist vorbei!");
}
}
}
}