Raised This Month: $208 Target: $400

Moving player using origin data

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Join Date: Nov 2005
Location: Slöinge,FALKENBG,SWE
Old 12-08-2006 , 22:59   Moving player using origin data
Reply With Quote #1

Hi, I'm making a plugin that will allow the admin to add points that all players will be teleported to when they've spawned from death.
But I've run into some problems when I'm trying to teleport the players to a point. Instead the player gets teleported out of the map area.

Btw, I get this warning when compiling: (47): warning 213: tag mismatch.
Attached Files
File Type: sma Get Plugin or Get Source (spawnchange.sma - 598 views - 1.8 KB)
bloodypizza is offline
Send a message via MSN to bloodypizza
Veteran Member
Join Date: Feb 2006
Old 12-09-2006 , 01:16   Re: Moving player using origin data
Reply With Quote #2

No more tag mismatch.
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> new changespawnmodel[33] new changespawnnumber = 0 new changespawnspawnnumber = 0 public cmd_changespawn(id) {     if(!is_user_alive(id))         return PLUGIN_HANDLED         if(changespawnnumber==32) return PLUGIN_HANDLED     changespawnnumber++     new Float: Origin[3]     entity_get_vector(id, EV_VEC_origin, Origin)         changespawnmodel[changespawnnumber] = create_entity("info_target")     if(!changespawnmodel[changespawnnumber]) {     changespawnnumber--     return PLUGIN_HANDLED     }         entity_set_string(changespawnmodel[changespawnnumber], EV_SZ_classname, "amxmodx_changespawn")     entity_set_model(changespawnmodel[changespawnnumber], "models/player/barney/barney.mdl")         entity_set_origin(changespawnmodel[changespawnnumber], Origin)         entity_set_int(changespawnmodel[changespawnnumber], EV_INT_solid, 0)     entity_set_int(changespawnmodel[changespawnnumber], EV_INT_movetype, 0)         return PLUGIN_HANDLED } public playerspawnspawn() {     if(changespawnnumber == changespawnspawnnumber)         changespawnspawnnumber = 0         changespawnspawnnumber++     if (changespawnnumber == 0)         return PLUGIN_HANDLED         new runbitch[3]       // I THINK THE     entity_get_vector ( changespawnmodel[changespawnspawnnumber], EV_VEC_origin, Float:runbitch)// PROBLEM     set_user_origin(read_data(1), runbitch)      // LAYS HERE (This is row 47)     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("Change Spawn Points","BETA 1","Oskar Larsson H")     register_clcmd("xx","cmd_changespawn",ADMIN_BAN,"")     register_event("ResetHUD","playerspawnspawn","be") } public plugin_precache() {     precache_model("models/player/barney/barney.mdl") } public plugin_modules() {     require_module("fun")     require_module("engine") }
stupok is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode