Scripting HELP
#1

I am Navroop, and I am kinda stuck in the gamemode that i am editing and i want to make a command like this like when a player a is wanted he cant use the getcar command and gohome command and other command that teleports him. Please help me i really need help. I'll ask more questions if i need your help again!
Reply
#2

Looks like no one wana help me!
Reply
#3

SetPlayerWantedLevel
GetPlayerWantedLevel

You will need to use these functions. To disable certain commands for a user you will need to check if they have a wanted level.
Reply
#4

Add this var to the top of your gamemode

pawn Код:
new bool:Wanted[MAX_PLAYERS char];
When the player is wanted, in that code put:

pawn Код:
Wanted{playerid} = true;
on OnPlayerConnect put:

pawn Код:
Wanted{playerid} = false;
and on your commands getcar, gohome and all the teleport commands you should put:

pawn Код:
if(Wanted{playerid} == true) return SendClientMessage(playerid, ~1, "You can't teleport, you are WANTED!");

That's all.
Reply
#5

Quote:
Originally Posted by JavoDiaz
Посмотреть сообщение
Add this var to the top of your gamemode

pawn Код:
new bool:Wanted[MAX_PLAYERS char];
When the player is wanted, in that code put:

pawn Код:
Wanted{playerid} = true;
on OnPlayerConnect put:

pawn Код:
Wanted{playerid} = false;
and on your commands getcar, gohome and all the teleport commands you should put:

pawn Код:
if(Wanted{playerid} == true) return SendClientMessage(playerid, ~1, "You can't teleport, you are WANTED!");

That's all.
Thanks dude, thats all i need! I rep + ya!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)