Stupid Questions
#1

I've got 2 questions:

I'm using ZCMD, and i want to put that if someone type a wrong command, to say "try /help for more infos" or something like this.

The other question is that:

I have this code:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    MySQLCheck();
    for(new i = 0; i < 50; i++ ){
        SendClientMessage(playerid, COLOR_WHITE, "");
    }
    new string[128],sendername[MAX_PLAYER_NAME];
    format(sendername, sizeof(sendername), "%s", PlayerName(playerid));
    if(IsPlayerNPC(playerid))
    {
        if(strcmp(sendername,"Spaciatore",true) == 0)
        {
            SetSpawnInfo(playerid,69,223,2286.4858,-2426.7209,3.0000,3.7297,-1,-1,-1,-1,-1,-1);
        }
        if(strcmp(sendername,"Binco",true) == 0)
        {
            SetSpawnInfo(playerid,69,211,207.5418,-98.6980,1005.2578,178.7630,-1,-1,-1,-1,-1,-1);
        }
But i want to put that NPS like idles. how to do that (i dont remeber)
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(mypos, 5, cmdtext);
    dcmd(train, 5, cmdtext);
    return Sendclientmessage(playerid, color, "");
}
For ur first q.
Reply
#3

ZCMD - just use sscanf2 from ******.

Idle. Dont add that SetSpawninfo or add wariable to check if `SetSpawnInfo` is aviable to use.

if(variable = 1) SetSpawnInfo
else {} // leave blank
Reply
#4

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(mypos, 5, cmdtext);
    dcmd(train, 5, cmdtext);
    return Sendclientmessage(playerid, color, "");
}
For ur first q.
Wrong. He is using "ZCMD", not "strcmp".

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_GREY, "That command doesn't exist in our game-mode. (/commands)");
    return 1;
}
Reply
#5

Ohh sorry i never used zcmd b4..


This forum requires that you wait 120 seconds between posts. Please try again in 60 seconds.
GTFO.
Reply
#6

Thanks RealCop228 for your answer, and all...but i didnt unsterdand the thing of idle NPC'S
Reply
#7

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new string[128], sendername[25];
    MySQLCheck();
    for(new i = 0; i < 50; i++ )
    {
        SendClientMessage(playerid, COLOR_WHITE, "");
    }
    format(sendername, 25, "%s", PlayerName(playerid));
    if(IsPlayerNPC(playerid))
    {
        if(strcmp(sendername,"Spaciatore",true) == 0)
        {
            SetPlayerSkin(playerid, 223);
            SetPlayerPos(playerid, 2286.4858, -2426.7209, 3.0000);
            SetPlayerFacingAngle(playerid, 3.7297);
        }
        if(strcmp(sendername,"Binco",true) == 0)
        {
            SetPlayerSkin(playerid, 211);
            SetPlayerPos(playerid, 207.5418, -98.6980, 1005.2578);
            SetPlayerFacingAngle(playerid, 178.7630);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)