Versuchs mal so:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
//====SPAWN==========
if(Spieler[playerid][pSpawn]==0)
{
SpawnPlayer(playerid);
TextDrawHideForPlayer(playerid,spawn);
Spieler[playerid][pSpawn]=1;
SendClientMessage(playerid,COLOR_GREEN,"Du bist erfolgreich gespawnt");
}
return 1;
}