AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Spawn Protection (https://forums.alliedmods.net/showthread.php?t=1886)

viper6742 01-08-2005 15:18

I was looking in the amxx logs and found an error

[AMXX] Native error in "set_user_godmode" on line 103 (file "spawnprotection.sma").
[Fun] Invalid player 1

player 2, player 3, etc......

Help???

Peli 01-08-2005 17:35

I'm glad too hear it's doing better , I'll see what's up with that set_user_godmode() thing. Thank you guys for being patient and helping out , thanks to Nick for helping aswell. :)

Peli 01-08-2005 17:42

I looked at it , and the error has to do with this last function that takes off godmode :
Code:
public sp_off(id) {    set_user_godmode(id,0)    return PLUGIN_HANDLED }
It says there is a native error on "set_user_godmode(id,0)" but I don't see any native errors...
And I'm not really sure what that message means... "[Fun] Invalid player 1

player 2, player 3, etc......" , hmm maybe you were trying to set someone on godmode while spawnprotection was on? This is a wierd error , I'll try to fix it. :) P.S. I'll keep your sugguestion about the glowing XxKpAznGuyxX , it sounds great.

XxKpAznGuyxX 01-08-2005 18:50

ooOo thanks I saw one in like a death match server before and I was like awesome!! and can you tell me which line to change so the god mod can be like 2-3 secs? kinda hard to play it on FY_maps for counter-strike.

FeuerSturm 01-08-2005 19:57

you're getting "Invalid Player" errors when a player left
the server and there's still a task to perform on him.

so you can either add
Code:

public client_disconnect(id){
      remove_task(id)
      return PLUGIN_HANDLED
}

or change your code to remove godmode to:
Code:

public sp_off(id) {
  if(!is_user_connected(id)){
            return PLUGIN_HANDLED
  }
  else {
            set_user_godmode(id,0)
            return PLUGIN_HANDLED
  }
}

safest way would be to do both :wink:

Peli 01-08-2005 20:22

Thanks FireStorm , I'll add your code ( both parts ) , I forgot to take off the task when they disconnect :? lol. P.S. XxKpAznGuyxX , you can use the console command : Amx_sptime , to change the spawn protection time between 1 and 10 second(s). If you guys could test the plugin on the front page for CS/CZ it would be nice , then let me know if you get any errors bugs or experience any strange problems. Thank you guys for being patient and helping. Then I will let you know with a message on the front page that says if the plugin works perfectly , then I can continue to make the next version with some good sugguestions in mind. :)

XxKpAznGuyxX 01-08-2005 22:18

the untested version works great! :D and the commands work can't wait till the next version. Keep Up the Good work!

Peli 01-09-2005 00:15

Thanks man , I'll update the front page and I'll start working on the next version with those sugguestions in mind thanks everyone.

viper6742 01-09-2005 13:31

Thanks Peli

Everthing seems to be working great.
Looking forward to the next version.

Thanks again for all your work.

Peli 01-09-2005 20:54

Hey XxKpAznGuyxX , I added the glow function , mind testing it out? :)


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

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