AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Auto command (https://forums.alliedmods.net/showthread.php?t=159947)

RuleBreaker 06-23-2011 13:41

Auto command
 
How to make plugin that`ll do some command on player when he conects (if he doesn`t have e.g. "a" flag).
For example I want to turn on noclip on every player that connect execpt admins with flag "a". But I don`t want to use "set_user_noclip" i want to use amx_noclip

Better example: If i use command amx_kick it`ll kick all players without flag "a" :)

Blue Snake. 06-23-2011 13:49

Re: Auto command
 
You should try this (Not tested)

PHP Code:

public client_putinserver(id)
{
set_task(5.0,"usenoclip",id)
}

public 
usenoclip(id)
{
new 
name[32]
get_user_name(id,name,31)
if(!
access(idADMIN_IMMUNITY))
server_cmd("amx_noclip %s",name)




All times are GMT -4. The time now is 23:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.