SA-MP Forums Archive
Strings not working - 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: Strings not working (/showthread.php?tid=374501)



Strings not working - Luke_James - 03.09.2012

pawn Код:
command(k9attack, playerid, params[])
{
    if(Player[playerid][Faction] == 1)
    {
        new id;
        if(sscanf(params,"u",id)) return SendClientMessage(playerid,WHITE,"SERVER: /K9attack [PlayerID/Name]");
        if(pTazed[id] == 0)
        {
            TogglePlayerControllable(id, false);
            ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1, 1);
            pTazed[id] = 1;
            SetTimerEx("Tazed", 10000, 0, "d", id);
            SendClientMessage(id, 0xFF0000FF, "You've been subdued by the police dog! (( 60 seconds ))");
        }
        else if(pTazed[id] == 1)
        {
            new string[128];
            format(string, sizeof(string), "%s removes the leash from the attack dog, releasing it as it chases down the suspect.",MaskOnOff(playerid));
            CloseMessage(playerid, ACTION, string);
            new action[128];
            if(sscanf(params, "s[128]", action))
            CloseMessage(playerid,ACTION,"The police dog bites the suspect, tackling him/her to the ground (( Police Dog ))");
        }
    }
    else return SendClientMessage(playerid, WHITE, "You're not part of the SCPD!");
    return 1;
}
When you do /k9attack <name>, it shows the player the "You've been subdued by the police dog!", but these strings;

pawn Код:
new string[128];
            format(string, sizeof(string), "%s removes the leash from the attack dog, releasing it as it chases down the suspect.",MaskOnOff(playerid));
            CloseMessage(playerid, ACTION, string);
            new action[128];
            if(sscanf(params, "s[128]", action))
            CloseMessage(playerid,ACTION,"The police dog bites the suspect, tackling him/her to the ground (( Police Dog ))");
don't appear


Re: Strings not working - Camacorn - 03.09.2012

Show me the CloseMessage stock.


Re: Strings not working - Luke_James - 03.09.2012

There is no CloseMessage stock. Sometimes the string will work, sometimes it doesn't.


Re: Strings not working - Luke_James - 03.09.2012

Anyone?