2 CMds !! +1 Rep to person who Helped me First
#1

Hey im making 2 cmds. /camera and other /parachute.

1.Camera : It gives Camera
2./parachute : It gives parachute

Can someone tell me how to give Player all these thing ??/

Tell me ASAP !!
Reply
#2

pawn Код:
if (strcmp("/camera", cmdtext, true, 7) == 0)
{
    GivePlayerWeapon(playerid, 43, 500);
    return 1;
}
if (strcmp("/parachute", cmdtext, true, 7) == 0)
{
    GivePlayerWeapon(playerid, 46, 500);
    return 1;
}
Weapon IDs
Reply
#3

Thx heres a rep for u !!
Reply
#4

The second one is wrong, how the hell can a player have a parachute with 500 ammo? Think before you script senseless around;

pawn Код:
if (strcmp("/parachute", cmdtext, true, 7) == 0)
{
    GivePlayerWeapon(playerid, 46, 0);
    return 1;
}
Reply
#5

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
The second one is wrong, how the hell can a player have a parachute with 500 ammo? Think before you script senseless around;

pawn Код:
if (strcmp("/parachute", cmdtext, true, 7) == 0)
{
    GivePlayerWeapon(playerid, 46, 0);
    return 1;
}
Just try, it will work -.-
Reply
#6

It may cause problems and isn't a good code anyways!
Reply
#7

Guys im getting errors can u put them in this script :
Код:
#include <a_samp>

//beacon
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
	if(strcmp(cmdtext, "/beacon", true) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,0xFFFFFFFFF,"You Need to be in vehicle !");
        }
        else
		{
            SetPlayerColor(playerid, 0xFFFF00FF);
            SendClientMessage(playerid,0xFFFFFFFFF,"You are Beacon !");
        }
        return 1;
	}
	return 0;
}
Thx
Reply
#8

First of all, indent your code, it is horrible difficult to see what's where. Secondly, what are your errors and on which line do they appear?
Reply
#9

Quote:
Originally Posted by Avi57
Посмотреть сообщение
Guys im getting errors can u put them in this script :
Код:
#include <a_samp>

//beacon
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
	if(strcmp(cmdtext, "/beacon", true) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,0xFFFFFFFFF,"You Need to be in vehicle !");
        }
        else
		{
            SetPlayerColor(playerid, 0xFFFF00FF);
            SendClientMessage(playerid,0xFFFFFFFFF,"You are Beacon !");
        }
        return 1;
	}
	return 0;
}
Thx
Show the error.
Reply
#10

I just laughed hardly on this one. I remember the good old times when noobs were 'rewarding' people for helping them with money. Now they just rep that person and they get whatever they want. Dudes, WTF? That's not even a fucking gamemode. It has only one callback God damn it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)