ZCMD include.
#1

guys i am new to those commands includes can anyone give me a standard command with them like /heal ,??
i can do it like this:
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/heal", cmdtext, true, 5) == 0)
	{
		SetPlayerHealth(playerid, 100);
		return 1;
	}
But i want to know how to do it with zcmd or sscanf can anyone post some examples.
Reply
#2

And the first thing that pops into your mind is "let's make a topic" and not "let's search"?
Reply
#3

WOW

https://sampforum.blast.hk/showthread.php?tid=91354
Reply
#4

Sample code
pawn Code:
CMD:healme(playerid,params[]) {
    SetPlayerHealth(playerid, 100);
    return 1;
}


CMD:heal(playerid,params[]) {
    new otherplayer;
    if(sscanf(params,"u",otherplayer)) return SendClientMessage(playerid,COLOR_RED,"Usage: /heal [playerid]");
    if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid,COLOR_RED,"That person is not online");
    SetPlayerHealth(otherplayer, 100);
    SendClientMessage(otherplayer, COLOR_GREEN,"You have been healed! Praise the Lord!")
    return 1;
}
Reply
#5

I Tought that i will get more better explain if i posted a topic,andif u want plzz help me
Reply
#6

Quote:
Originally Posted by aymane123
View Post
I Tought that i will get more better explain if i posted a topic,andif u want plzz help me
Quote:
Originally Posted by TwinkiDaBoss
View Post
Sample code
pawn Code:
CMD:healme(playerid,params[]) {
    SetPlayerHealth(playerid, 100);
    return 1;
}


CMD:heal(playerid,params[]) {
    new otherplayer;
    if(sscanf(params,"u",otherplayer)) return SendClientMessage(playerid,COLOR_RED,"Usage: /heal [playerid]");
    if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid,COLOR_RED,"That person is not online");
    SetPlayerHealth(otherplayer, 100);
    SendClientMessage(otherplayer, COLOR_GREEN,"You have been healed! Praise the Lord!")
    return 1;
}
Reply
#7

Thx To All i Understood.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)