zcmd help
#1

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;
}
Reply
#2

So god mod is working ?
Reply
#3

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

Ok, if you want to change this
Quote:

Player (2) has disabled your god mode.

Then show the full function of that cmd.
Reply
#5

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
Reply
#6

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.
Reply
#7

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..
Reply
#8

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

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)