• Welcome to Vice City Multiplayer.
 

!afk and the !back commands

Started by theway, February 27, 2011, 03:11:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

theway

yeah man,  U know ,   if u setcontrollable = 0 , sometime,  other player can kill you,

in fact, you can add 
//--
new  xue;
//--     


now , please see .

else if (strcmp(cmd, "!afk", true) == 0) {
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) {
format(szMsg,sizeof(szMsg),"%s: is gone for a while!",gPlayers[playerid],playerid);
SendClientMessageToAll(COLOR_YELLOW, szMsg);
TogglePlayerControllable(playerid,0);
GetPlayerHealth(playerid,xue);
SetPlayerHealth(playerid,10000000);
}
return 1;
}//
                         else if (strcmp(cmd, "!back", true) == 0) {
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)){
format(szMsg,sizeof(szMsg),"%s: is Back Beware !",gPlayers[playerid],playerid);
SendClientMessageToAll(COLOR_YELLOW, szMsg);
SetPlayerHealth(playerid,xue);
TogglePlayerControllable(playerid,1);
}

return 1;
}



When a player input !Afk when his health records to "  xue "
and  type !back  return  xue  to playerhealth .
then  if you type !afk,  so ,  nobody can kill u ,  but you can't move .. 

Our server : 61.164.159.35:7777

yazeen

Good this will help for making god mode? ???