Need scripting help
#1

Hello there. I come again for some scripting help. Please send in some helpful responses and I might +rep you!

I would like the following:
- I would like to know how to restrict skins to players with 20+ score.
- I would like to know how to make races (with multiple starting points, you drive to one and /startrace)

I will bump this topic if I need more help, thanks a lot and I hope I get a response quick.
Reply
#2

Quote:
Originally Posted by 69
Посмотреть сообщение
- I would like to know how to restrict skins to players with 20+ score.
If I udnerstood you right you need this:
pawn Код:
if(GetPlayerSkin(playerid) == 0)
    {
        if(GetPlayerScore(playerid) < 20)
        {
            SendClientMessage(playerid,-1,"You need to have 20 score to play with this skin!");
            return 0;
        }
    }
It's not tested!
Edit: It should be added on
Код:
OnPlayerRequestSpawn
And you didn't tell is it of certain skins or its for all of them ?
Reply
#3

Quote:
Originally Posted by x96664
Посмотреть сообщение
If I udnerstood you right you need this:
pawn Код:
if(GetPlayerSkin(playerid) == 0)
    {
        if(GetPlayerScore(playerid) < 20)
        {
            SendClientMessage(playerid,-1,"You need to have 20 score to play with this skin!");
            return 0;
        }
    }
It's not tested!
Edit: It should be added on
Код:
OnPlayerRequestSpawn
And you didn't tell is it of certain skins or its for all of them ?
This function only sends a message, it doesn't prevent the player from choosing the skin

EDIT: Didn't read your edited message, it works!!
Reply
#4

Quote:
Originally Posted by 69
Посмотреть сообщение
This function only sends a message, it doesn't prevent the player from choosing the skin
Код:
return 0;
should stop him!
Reply
#5

It works. Anyways, how about the racing thing, please
Reply
#6

Sorry for the double post but I'd also like to know how to restrict ONE vehicle (preferably by its ID) to a certain score.
Also how to restrict a vehicle to a certain name (you can't enter if your name is not SixtyNine for example).
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)