[HELP] Two Questions - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Two Questions (
/showthread.php?tid=198943)
[HELP] Two Questions - Larsey123IsMe - 13.12.2010
1. Can someone make an mute-unmute command with "strcmp"?
2. Mega Jump (on/off)
Mega Jump(on):
pawn Код:
else if(dialogid == 15)
{
if(response)
{
if (PRESSED(KEY_JUMP))
}
SetPlayerVelocity(playerid,0.0,0.2,0.5);
}
}
return 1;
}
Mega Jump(off):
pawn Код:
else if(dialogid == 16)
{
if(response)
{
if (PRESSED(KEY_JUMP))
}
SetPlayerVelocity(playerid,0.0,0.0,0.0);
}
}
return 1;
}
Re: [HELP] Two Questions -
blackwave - 13.12.2010
pawn Код:
JUMP[playerid] == 1 // Actived
JUMP[playerid] == 0 // Desactived
Re: [HELP] Two Questions -
XePloiT - 13.12.2010
just use ZCMD or DCMD... but whatever.... enjoy: Mute command
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
new cc[128];
sscanf(cmdtext,"s[128]",cc);
if(!strcmp(cc,"/mute",true))
{
new id[MAX_PLAYERS],str[128];
if(sscanf(cmdtext,"s[128]i",cc,id[playerid])) return SendClientMessage(playerid,COLOR_RED,"How To Use: /Mute [ ID ]");
if(!IsPlayerConnected(id[playerid])) return SendClientMessage(playerid,COLOR_RED,"Player Not Connected");
if(MutedP[playerid]==0)
{
MutedP[playerid]=1;
format(str,128,"You Have Muted Player ID : %d",id[playerid]);
SendClientMessage(id[playerid],COLOR_WHITE,"You Have Been Muted By The Admin");
}
else
{
MutedP[playerid]=0;
format(str,128,"You Have UnMuted Player ID : %d",id[playerid]);
SendClientMessage(id[playerid],COLOR_WHITE,"You Have Been Muted By The Admin");
}
return SendClientMessage(playerid,COLOR_GREEN,str);
}
return 0;
}
//--------------
public OnPlayerText(playerid, text[])
{
if(MutedP[playerid]==1)
{
SendClientMessage(playerid,COLOR_RED,"You Are On Mute");
return 0;
}
return 1;
}