SA-MP Forums Archive
Command - 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: Command (/showthread.php?tid=499946)



Command - TheLastShadow - 10.03.2014

I want to make me this commands in if(strcmp ...). /pos to get my coordonate , when i write /startfight , appear a message /join , and players write /join get him at my save coordonates of /pos.


Re : Command - Clad - 10.03.2014

You mean like event right ?


Re: Command - TheLastShadow - 10.03.2014

yes i do


Re: Command - iThePunisher - 10.03.2014

you should search for this there are many event filterscripts well nvm
here is one http://www.mediafire.com/download/ve...System+Eng.rar


Re: Command - TheLastShadow - 10.03.2014

Please make this commands


Re : Command - Clad - 10.03.2014

He gave you link download open and check


AW: Command - Macronix - 10.03.2014

Here, try this:
pawn Код:
new FightStarted = 0;
new Float:fight_x,
    Float:fight_y,
    Float:fight_z;

//Position save command
if (strcmp("/pos", cmdtext, true) == 0)
{
    SendClientMessage(playerid, -1, "* Fight Position saved!");
    GetPlayerPos(playerid, fight_x, fight_y, fight_z);
    return 1;
}

//Startfight command
if (strcmp("/startfight", cmdtext, true) == 0)
{
    if(FightStarted == 1) return SendClientMessage(playerid, -1, "* A fight was already started!");

    new str[128], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(str, sizeof(str), "%s has started a fight! Type /join to join it!", pname);
    SendClientMessageToAll(playerid, -1, str);
   
    FightStarted = 1;
    return 1;
}

//Join command
if (strcmp("/join", cmdtext, true) == 0)
{
    if(FightStarted == 0) return SendClientMessage(playerid, -1, "* There is no active fight!");

    SendClientMessage(playerid, -1, "* Joined the fight!");
    SetPlayerPos(playerid, fight_x, fight_y, fight_z);
    return 1;
}