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



zcmd help - SnG.Scot_MisCuDI - 12.12.2011

I made a command where you do /godp and it gives the player god mode. How can i make it so when i give another player god it says on my screen:
You have given Player (1) god mode.
Then on his screen it says Player (2) has given you god mode.
Then if i type it again /godp it shuts it off. Player (2) has disabled your god mode. You have Disabled Player (1) god mode.
Im new to zcmd so im still learning.

Red: admin
Green: player

Here is my code so far.

pawn Код:
CMD:godp(playerid,params[])
{
        new pname[24], targetid, string[128];
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown Command.");
        if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"USAGE: /godp [playerid]");

        SetPlayerHealth(targetid,100000);
        return 1;
}



Re: zcmd help - Ironboy - 12.12.2011

So god mod is working ?


Re: zcmd help - SnG.Scot_MisCuDI - 12.12.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
So god mod is working ?
Yes it is working.


Re: zcmd help - Ironboy - 12.12.2011

Ok, if you want to change this
Quote:

Player (2) has disabled your god mode.

Then show the full function of that cmd.


Re: zcmd help - SnG.Scot_MisCuDI - 12.12.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Ok, if you want to change this

Then show the full function of that cmd.
i dont understand. Thats my whole code. I dont know what to add to disable it and send those messages to the player. Thats what i need help on


Re: zcmd help - Ironboy - 12.12.2011

Yes show that function only not the hole script.
pawn Код:
CMD:godp(playerid,params[])
{
        new pname[24], targetid, string[128];
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown Command.");
        if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"USAGE: /godp [playerid]");

        SetPlayerHealth(targetid,100000);
        return 1;
}
In this command the function about "Player (2) has given you god mode. " is not there.


Re: zcmd help - SnG.Scot_MisCuDI - 12.12.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Yes show that function only not the hole script.
pawn Код:
CMD:godp(playerid,params[])
{
        new pname[24], targetid, string[128];
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown Command.");
        if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,-1,"USAGE: /godp [playerid]");

        SetPlayerHealth(targetid,100000);
        return 1;
}
In this command the function about "Player (2) has given you god mode. " is not there.
I know.. None of those messages are. That's what I'm asking help on. How to add those messages and disable the god mode when you type the cmd in again..


Re: zcmd help - Ironboy - 12.12.2011

That message is already there in your script otherwise it wont show that message.Try to find it


Re: zcmd help - SnG.Scot_MisCuDI - 12.12.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
That message is already there in your script otherwise it wont show that message.Try to find it
Okay, you've got me really confused. In my script it has no messages at all. What I'm asking for is how to ADD them into the script you see above.


Re: zcmd help - Ironboy - 12.12.2011

Quote:
Originally Posted by googamalugafoo
Посмотреть сообщение
Okay, you've got me really confused. In my script it has no messages at all. What I'm asking for is how to ADD them into the script you see above.
Oh now i got it, i though that message is already there in your script..
EDUT: Let me try it.