Player doesnt get weapons - 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: Player doesnt get weapons (
/showthread.php?tid=440120)
Player doesnt get weapons -
NicholasA - 28.05.2013
Код:
public OnPlayerRequestClass(playerid, classid)
{
if(hasAssassin == false) // If there is no Assassin on the server he becomes it
{
new string[64];
SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1, 0, 0, 0, 0, 0, 0);
format(string,sizeof(string),"The assassin has joined with the id: %d",playerid);
print(string);
PlayerVar[playerid][isAssassin] = 1;
SpawnPlayer(playerid);
GivePlayerWeapon(playerid, 34, 99999999);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 44, 1);
SetPlayerColor(playerid, 0xFFF0000);
TextDrawColor(gTextDraw, 0xFF01111);
TextDrawSetString(gTextDraw, "You are the assassin, type /help for help.");
TextDrawShowForPlayer(playerid, gTextDraw);
SetTimer("destroy", 8000, false);
}
Why dont i get my guns?
Re: Player doesnt get weapons -
dubyabeast - 28.05.2013
You can give the player 3 guns in SetSpawnInfo, should work:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(hasAssassin == false) // If there is no Assassin on the server he becomes it
{
new string[64];
SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1, 34, 99999, 4, 1, 44, 1);
format(string,sizeof(string),"The assassin has joined with the id: %d",playerid);
print(string);
PlayerVar[playerid][isAssassin] = 1;
SpawnPlayer(playerid);
SetPlayerColor(playerid, 0xFFF0000);
TextDrawColor(gTextDraw, 0xFF01111);
TextDrawSetString(gTextDraw, "You are the assassin, type /help for help.");
TextDrawShowForPlayer(playerid, gTextDraw);
SetTimer("destroy", 8000, false);
}
Re: Player doesnt get weapons -
NicholasA - 28.05.2013
Quote:
Originally Posted by dubyabeast
You can give the player 3 guns in SetSpawnInfo, should work:
pawn Код:
public OnPlayerRequestClass(playerid, classid) { if(hasAssassin == false) // If there is no Assassin on the server he becomes it { new string[64]; SetSpawnInfo(playerid, 0, 285, 1525.8599,938.2324,10.8203, 1, 34, 99999, 4, 1, 44, 1); format(string,sizeof(string),"The assassin has joined with the id: %d",playerid); print(string); PlayerVar[playerid][isAssassin] = 1; SpawnPlayer(playerid); SetPlayerColor(playerid, 0xFFF0000); TextDrawColor(gTextDraw, 0xFF01111); TextDrawSetString(gTextDraw, "You are the assassin, type /help for help."); TextDrawShowForPlayer(playerid, gTextDraw); SetTimer("destroy", 8000, false); }
|
Still doesnt give them?! what the hell is going on
Re: Player doesnt get weapons -
iGetty - 28.05.2013
Do you have an anti-cheat?
Re: Player doesnt get weapons -
SuperViper - 28.05.2013
Give the weapons under
OnPlayerSpawn, not
OnPlayerRequestClass.
Re: Player doesnt get weapons -
NicholasA - 28.05.2013
Quote:
Originally Posted by SuperViper
Give the weapons under OnPlayerSpawn, not OnPlayerRequestClass.
|
Thanks