2 CMds !! +1 Rep to person who Helped me First -
Avi57 - 21.04.2012
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 !!
Re: 2 CMds !! +1 Rep to person who Helped me First -
Ironboy - 21.04.2012
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
Re: 2 CMds !! +1 Rep to person who Helped me First -
Avi57 - 21.04.2012
Thx heres a rep for u !!
Re: 2 CMds !! +1 Rep to person who Helped me First -
Twisted_Insane - 21.04.2012
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;
}
Re: 2 CMds !! +1 Rep to person who Helped me First -
Ironboy - 21.04.2012
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 -.-
Re: 2 CMds !! +1 Rep to person who Helped me First -
Twisted_Insane - 21.04.2012
It may cause problems and isn't a good code anyways!
Re: 2 CMds !! +1 Rep to person who Helped me First -
Avi57 - 21.04.2012
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
Re: 2 CMds !! +1 Rep to person who Helped me First -
Twisted_Insane - 21.04.2012
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?
Re: 2 CMds !! +1 Rep to person who Helped me First -
Ironboy - 21.04.2012
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.
Re: 2 CMds !! +1 Rep to person who Helped me First -
sleepysnowflake - 21.04.2012
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.