use command 1x...
#1

hi there!, here is a little script.

Quote:

if(!strcmp(cmdtext, "/help"))
{
SendClientMessage(playerid,WHITE,"--------HELP-----------------------");
SendClientMessage(playerid,GREEN,"This is a Team Death Match gameplay. You are in a fight between Vietnam and USA, have Fun. We now have killstreaks.");
SendClientMessage(playerid,WHITE,"--------HELP-----------------------");
return 1;
}

How can I make it that you can only use /help once? That it disables after?
Reply
#2

Variables/PVars.

This forum requires that you wait 120 seconds between posts. Please try again in 31 seconds.
Reply
#3

Can you give me an example? Thanks.

Then: you get a message: Sorry, you already have used this command.
Reply
#4

Top of code:

pawn Код:
new usedhelp[MAX_PLAYERS] = 0;
OnPlayerConnect

pawn Код:
usedhelp[playerid] = 0;
OnPlayerCommandText

pawn Код:
if(!strcmp(cmdtext, "/help"))
{
if(usedhelp[playerid] == 1) return SendClientMessage(playerid,COLOR_yourcolourhere,"You are NOT allowed to use this command!");
SendClientMessage(playerid,WHITE,"--------HELP-----------------------");
SendClientMessage(playerid,GREEN,"This is a Team Death Match gameplay. You are in a fight between Vietnam and USA, have Fun. We now have killstreaks.");
SendClientMessage(playerid,WHITE,"--------HELP-----------------------");
usedhelp[playerid] = 1;
return 1;
}
Reply
#5

let emt ry it, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)