Weapon on spawn
#1

How can i give players weapon depending on their team and which skin they choose for the team , as simple as that , i think i have a way but i haven't scripted it because it will be lot of repeating etc and i want to hear or even see example's of how you would would go about doing this code.

For Example: Skin 230 is a vip skin so if i choose skin 230 when i spawn i will get sniper/desert/molotov etc.. But that will only be assigned to skin 230 and if the player is on VIP team..

Example 2: Forget about the skin check. But suppose a player is on VIP Team , VIP team consist of 2 skins i want to assign weapons depending on the one they choose to spawn with..
Reply
#2

You can try this....

On the top of the script
PHP Code:
new Team;
#define Team_VIP   1 //making team
#define Team_Something 
PHP Code:
public OnPlayerSpawn(playerid)
{
    if(
GetPlayerSkin(playerid) == 230)
     {
          
//GivePlayerWeapon(playerid,weaponid,ammo);
        
GivePlayerWeapon(playerid,34,1000); //Sniper with 1000 ammos
        
GivePlayerWeapon(playerid,24,1000); //Desert with 1000 ammos
        
GivePlayerWeapon(playerid,18,50); //50 moltoves
       
}
    return 
1;

Reply
#3

AddPlayerClass has all of this literally built in.
Reply
#4

Quote:
Originally Posted by Vince
View Post
AddPlayerClass has all of this literally built in.
XD who doesn't know that? anyways i dont want to use that i want to make it unique so i just wanted to know how you guys would go about doing it, without using addplayerclass cause i have anti-wephacks.. Anyways , any other suggestions?
Reply
#5

Quote:
Originally Posted by 1fret
View Post
XD who doesn't know that?
You could fill a book with all the things people don't know. For example some people still insist on using the ancient "PlayerToPoint" when the native IsPlayerInRangeOfPoint has existed since 0.3a. Nothing surprises me anymore. If your anti-cheat flags positives for weapons added with AddPlayerClass then the anti-cheat is bad. Fix the anti-cheat rather than trying to work around it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)