Need Help
#1

i want to change when player death they must type /kill to spawn but my people in server they use F3 in mod_S... and they didn't wait to type /kill

how can i change when player death they must still at same place untill they type /kill and if they use F3 they will spawn at same place and die again

Thks For All answer
Reply
#2

Put this at the top:

Код:
new bool:allowedtospawn[MAX_PLAYERS];
Then under OnPlayerDeath(playerid,reason)

Код:
if(killerid== INVALID_PLAYER_ID)
{
  TogglePlayerSpectating(playerid,1);
  TogglePlayerControllable(playerid,0);
  SendClientMessage(playerid,0xff0000aa,"Type /kill to spawn again.");
  allowedtospawn[playerid]=false;
}
Now under OnPlayerCommandText(playerid,cmdtext[])

Код:
if(!strcmp(cmdtext,"/kill",true,5))
{
  SetPlayrHealth(playerid,0.0);
  allowedtospawn[playerid]=true;
  return 1;
}
Then under OnPlayerSpawn(playerid)

Код:
if(allowedtospawn[playerid]==false)
{
SetPlayerHealth(playerid,0.0);
allowedtospawn[playerid]=true;
}
The above code should work.
Reply
#3

on this 2 line it's show the same error

if(allowedtospawn[playerid]==false)
if(killerid== INVALID_PLAYER_ID)

error 010: invalid function or declaration
Reply
#4

Anyone Can help me ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)