This Script Work Or Not?
#1

#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/godmodez", cmdtext, true, 5) == 0)
{
SetPlayerArmour(playerid, 9999999999999.0);
SetPlayerHealth(playerid, 9999999999999.0);

return 1;
}
return 0;
}
Reply
#2

No.. just put 5000 it will work or this
pawn Код:
#define INFINITY (Float:0x7F800000)
And
pawn Код:
SetPlayerHealth(playerid, INFINITY);
And also delete ,5
So it's like this :
pawn Код:
if (strcmp("/godmodez", cmdtext, true) == 0)
Command :
pawn Код:
#define INFINITY (Float:0x7F800000)
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/godmodez", cmdtext, true) == 0)
    {
        SetPlayerArmour(playerid, INFINITY);
        SetPlayerHealth(playerid, INFINITY);
        return 1;
    }
    return 0;
}
Note : I don't know if it works with the armour too ( the infinity thing ) but you can try.
Reply
#3

Oh Ok.How Can I Make It Need To Pay 5000 To Use This Command.
And I Want To Put Dialog 'God Mode CMD By Trollolollo'
Reply
#4

Quote:
Originally Posted by Trollolollo
Посмотреть сообщение
Oh Ok.How Can I Make It Need To Pay 5000 To Use This Command.
And I Want To Put Dialog 'God Mode CMD By Trollolollo'
pawn Код:
#define INFINITY (Float:0x7F800000)
#define DIALOG_MOCMD 32765
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/godmodez", cmdtext, true) == 0)
    {
        if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,-1,"You need $5.000 to use this command");
        SetPlayerArmour(playerid, INFINITY);
        SetPlayerHealth(playerid, INFINITY);
        GivePlayerMoney(playerid,-5000);
        ShowPlayerDialog(playerid, DIALOG_MOCMD, DIALOG_STYLE_MSGBOX, "Title", "Message", "Button 1", " Button 2");
        return 1;
    }
    return 0;
}
Something like this ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)