Hallo ich habe mir ein kleines deathmatch system gemacht.
Hier:
if(strcmp(cmdtext,"/dm3",true,10)==0)
{
dm3[playerid]=1;
GetPlayerPos(playerid,dm3_x,dm3_y,dm3_z);
new string[128];
SendClientMessage(playerid,gelb,"Du hast das Sawn-Off Deathmatch betreten!");
format(string,sizeof(string),"%s hatt das Sawn-Off Deathmatch betreten!",Name(playerid));
SendClientMessage(playerid,rot,"Benutze /exitdm3 um das Deathmatch zu verlassen!");
SendClientMessageToAll(gelb,string);
if(dm3[playerid]==1)
{
SetPlayerPos(playerid,1367.6770,2137.6821,11.0156);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,2800);
return 1;
}
if(dm3[playerid]==2)
{
SetPlayerPos(playerid,1328.9027,2124.4146,11.0156);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,2800);
return 1;
}
if(dm3[playerid]==3)
{
SetPlayerPos(playerid,1327.4717,2160.4189,11.0234);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,26,2800);
return 1;
}
return 1;
}
if(strcmp(cmdtext,"/exitdm3",true,10)==0)
{
SetPlayerPos(playerid,dm3_x,dm3_y,dm3_z);
dm3[playerid]=0;
return 1;
}
Hier onplayerdeath:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(playerid,-1);
SetPVarInt(playerid,"death",GetPVarInt(playerid,"death")+1);
SetPVarInt(killerid,"kills",GetPVarInt(killerid,"kills")+1);
if(dm3[playerid]==1)
{
dm3[playerid]=2;
return 1;
}
if(dm3[playerid]==2)
{
dm3[playerid]=3;
return 1;
}
if(dm3[playerid]==3)
{
dm3[playerid]=1;
return 1;
}
Das wars auch nur wenn ich immer sterbe respawn ich dort woh ich dehn befehl /dm3 gemacht habe.
Ich hoffe ihr könnt mir helfen.
MFG K44n