Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: [VM_U]Spectra.PhantoM^ on Dec 26, 2015, 01:25 PM

Title: Need Help in building /forcespawn
Post by: [VM_U]Spectra.PhantoM^ on Dec 26, 2015, 01:25 PM
else if (command == "forcespawn")
{
if (params.len() < 1) EMessagePlayer(player,  "Invalid parameters, /disarm playername reason");

else if (player.Level() < 7) EMessagePlayer(player, "Command level too high");

else if (!FindPlayer(params[0])) EMessagePlayer(player, "Unknown player %s", params[0]);

else

{

local plr = FindPlayer(params[0]);

EMessageAll("Administrator %s has forced %s to spawn.", player.Name, plr.Name, arguments.slice(params[0].len()));

plr.Spawn = true;
}
return 1;

}

I've done till this part but it gives me error Member variable not found can anyone tell me anything to put in place of plr.Spawn;?
Title: Re: Need Help in building /forcespawn
Post by: KAKAN on Dec 26, 2015, 01:33 PM
I see that your code is broken, anyways, if you say that the thing plr.SPawn is giving problem, then replace that with this:-
plr.Spawn();
Title: Re: Need Help in building /forcespawn
Post by: [VM_U]Spectra.PhantoM^ on Dec 26, 2015, 01:35 PM
Quote from: KAKAN on Dec 26, 2015, 01:33 PMI see that your code is broken, anyways, if you say that the thing plr.SPawn is giving problem, then replace that with this:-
plr.Spawn();
thankx it worked