Author Topic: Be Right Back [ Fully Advance ] 2 Systems !!  (Read 2523 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Be Right Back [ Fully Advance ] 2 Systems !!
« on: March 13, 2014, 02:07:22 pm »
Version 1

...

add this

Code: [Select]
new Gone[MAX_PLAYERS];
new bReason[MAX_PLAYERS];

Now Commands

 
Code: [Select]
  else if(strcmp(cmd,"brb", true) == 0)  {
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "Usage: /c brb [reason] [time]" );
else {
new tmp2[123];
tmp2 = strtok( cmdtext, idx );
new str[123];
Gone[playerid] = 1;
pReason[playerid] = strlen(tmp);
TogglePlayerControllable(playerid,0);
format(str, 123, " %s Will be Right Back In %d Minutes. Reason %s ", gPlayers[playerid], tmp2, tmp);
SendClientMessageToAll(COLOR_GREEN,str);
}
return 1;
}

else if(strcmp(cmd,"back", true) == 0)  {
new str[123];
Gone[playerid] = 0;
TogglePlayerControllable(playerid,1);
format(str, 123, " %s Is Back From %s ", gPlayers[playerid],  pReason[playerid]);
SendClientMessageToAll(COLOR_GREEN,str);
return 1;
}



onplayerdeath
Code: [Select]
if(Gone[playerid] == 1) {
SetPlayerHealth(killerid,0);
SendClientMessage(killerid,COLOR_RED," Auto Kill For Type Kill ");
}

Version 2

Code: [Select]
new bReason[][] = {
" Toilet ",
" Eating ",
" Tired ",
" Later ",
" Going To Sleep ",
" Going Somewhere "
};

put cmd in onplayertext

Code: [Select]
else if(strcmp(cmd,"brb", true) == 0) {
new randx = random(sizeof(bReason);
new ms[123];
format(ms,sizeof(ms)," %s Will Be Right Back Reason : %s ", gPlayers[playerid], bReason[randx][randx]);
SendClientMessageToAll(COLOR_GREEN,ms);
return 1;
}
[code]else if(strcmp(cmd,"back", true) == 0) {
new randx = random(sizeof(bReason);
new ms[123];
format(ms,sizeof(ms)," %s Is Back From %s ", gPlayers[playerid], bReason[randx][randx]);
SendClientMessageToAll(COLOR_GREEN,ms);
return 1;
}






« Last Edit: March 13, 2014, 05:22:30 pm by mrockxkingbutt »
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Rocky 26722

  • Guest
Re: Be Right Back [ Fully Advance ] 3 Systems !!
« Reply #1 on: March 13, 2014, 05:15:57 pm »
Nice Work Good Job