Help With some commands - 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)
+--- Thread: Help With some commands (
/showthread.php?tid=331624)
Help With some commands -
Anup_Rao - 05.04.2012
I want to know how i can make a car dealership in las venturas or how to create a car dealership of my own or any filterscript that works with latest samp client
And
Quote:
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFF4500AA,"You have killed yourself using /kill");
//suicide cmd
return 1;
}
|
This is the kill command but i want to create this command so that wanted players cant use the command
please make quotes and send a kill command that cant be used by wanted players i need the full command not only like add this line blah blah i need the whole command like the whole command should be added to the quote above and replied
I will add one rep if u help me pleaaaase help me please
Re: Help With some commands -
blank. - 05.04.2012
pawn Код:
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
if(GetPlayerWantedLevel(playerid) > 0)
{
return SendClientMessage(playerid,0xFF4500AA,"You can't use this command while wanted!");
}
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFF4500AA,"You have killed yourself using /kill");
//suicide cmd
return 1;
}
Re: Help With some commands -
Faisal_khan - 05.04.2012
Untested, hope it works:
pawn Код:
if (strcmp("/kill", cmdtext, true, 4) == 0)
{
if GetPlayerWantedLevel(playeird) >= 1
{
SendClientMessage(playerid, 0xFF4500AA,"You can kill yourself when you are wanted");
}
else
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFF4500AA,"You have killed yourself using /kill");
}
return 1;
}
Re: Help With some commands -
Anup_Rao - 05.04.2012
still not workin
Re: Help With some commands -
blank. - 05.04.2012
As in?
Re: Help With some commands -
Faisal_khan - 05.04.2012
Whose? (kiska?)
Re: Help With some commands -
Anup_Rao - 05.04.2012
mine it gives one error
Re: Help With some commands -
.FuneraL. - 05.04.2012
pawn Код:
if(strcmp("/kill", cmdtext, true) == 0)
{
if(GetPlayerWantedLevel(playerid) >= 1) return SendClientMessage(playerid, 0xFFFFFFFF, "You can not use the command because it is being Sought");
}else{
SetPlayerHealth(playerid , 0);
SendClientMessage(playerid, 0xFFFFFFFF, "You committed suicide , Using : /kill");
return 1;
}
Try this.
Re: Help With some commands -
blank. - 05.04.2012
Quote:
Originally Posted by .FuneraL.
pawn Код:
if(strcmp("/kill", cmdtext, true) == 0) { if(GetPlayerWantedLevel(playerid) >= 1 return SendClientMessage(playerid, 0xFFFFFFFF, "You can not use the command because it is being Sought"); }else{ SetPlayerHealth(playerid , 0); SendClientMessage(playerid, 0xFFFFFFFF, "You committed suicide , Using : /kill"); return 1; }
Try this.
|
It will generate an error due to the missing bracket.
Re: Help With some commands -
.FuneraL. - 05.04.2012
Quote:
Originally Posted by blank.
It will generate an error due to the missing bracket.
|
Edited.