dm1 spawn!help -
Airblog - 02.10.2014
Hi!
i download a fs for dm zone
it has 1dm zone /dm1
it works but i want every body that join dm and die, respawn in dm1!
Код:
#include <a_samp>
#include <streamer>
#include <sscanf>
#include <core>
#include <float>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x33CCFFAA
#define COLOR_ERROR 0xFF6A6AFF
#define COLOR_BOMB 0x96BD6AFF
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid,1);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/dm1", true) == 0)
{
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
GivePlayerMoney(playerid, -15000);
SendClientMessage(playerid, COLOR_RED, ".: Your Join DM 1 :.");
PlayerPlaySound(playerid ,3200,0,0,0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, 24, 18000);
GivePlayerWeapon(playerid, 25, 18000);
GivePlayerWeapon(playerid, 16, 18000);
GivePlayerWeapon(playerid, 28, 18000);
GivePlayerWeapon(playerid, 31, 18000);
return 1;
}
return 0;
}
Re: dm1 spawn!help -
PabloAguado - 02.10.2014
pawn Код:
new inDM[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(inDM[playerid] == 1)
{
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
return 1;
}
return 1;
}
Add inDM[playerid] = 1;
to your command and it should be all good.
Re: dm1 spawn!help -
Airblog - 02.10.2014
error:
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(44) : error 029: invalid expression, assumed zero
line 44:
public OnPlayerSpawn(playerid)
what now?
Re: dm1 spawn!help -
YanLanger - 02.10.2014
post all the code.
Re: dm1 spawn!help -
Airblog - 02.10.2014
Код:
#include <a_samp>
#include <streamer>
#include <sscanf>
#include <core>
#include <float>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x33CCFFAA
#define COLOR_ERROR 0xFF6A6AFF
#define COLOR_BOMB 0x96BD6AFF
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid,1);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/dm1", true) == 0)
{
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
GivePlayerMoney(playerid, -15000);
SendClientMessage(playerid, COLOR_RED, ".: Your Join DM 1 :.");
PlayerPlaySound(playerid ,3200,0,0,0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, 24, 18000);
GivePlayerWeapon(playerid, 25, 18000);
GivePlayerWeapon(playerid, 16, 18000);
GivePlayerWeapon(playerid, 28, 18000);
GivePlayerWeapon(playerid, 31, 18000);
return 1;
}
return 0;
new inDM[MAX_PLAYERS];
public OnPlayerSpawn(playerid);
if(inDM[playerid] == 1)
{
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
return 1;
}
return 1;
}
Re: dm1 spawn!help -
SWGamer - 02.10.2014
Try this
[code]
#include <a_samp>
#include <streamer>
#include <sscanf>
#include <core>
#include <float>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x33CCFFAA
#define COLOR_ERROR 0xFF6A6AFF
#define COLOR_BOMB 0x96BD6AFF
enum DMINFO
{
DM1
}
new dInfo[MAX_PLAYERS][DMINFO];
public OnPlayerSpawn(playerid)
{
if(dInfo[playerid][DM1] == 1)
{
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
GivePlayerMoney(playerid, -15000);
PlayerPlaySound(playerid ,3200,0,0,0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, 24, 18000);
GivePlayerWeapon(playerid, 25, 18000);
GivePlayerWeapon(playerid, 16, 18000);
GivePlayerWeapon(playerid, 28, 18000);
GivePlayerWeapon(playerid, 31, 18000);
}
TogglePlayerControllable(playerid,1);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/dm1", true) == 0)
{
dInfo[playerid][DM1] = 1;
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
GivePlayerMoney(playerid, -15000);
SendClientMessage(playerid, COLOR_RED, ".: Your Join DM 1 :.");
PlayerPlaySound(playerid ,3200,0,0,0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, 24, 18000);
GivePlayerWeapon(playerid, 25, 18000);
GivePlayerWeapon(playerid, 16, 18000);
GivePlayerWeapon(playerid, 28, 18000);
GivePlayerWeapon(playerid, 31, 18000);
return 1;
}
return 1;
}
Re: dm1 spawn!help -
Airblog - 02.10.2014
Код:
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(27) : warning 217: loose indentation
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(38) : warning 217: loose indentation
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(50) : warning 217: loose indentation
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(51) : warning 217: loose indentation
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(62) : warning 217: loose indentation
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(64) : warning 217: loose indentation
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(65) : warning 225: unreachable code
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(66) : error 029: invalid expression, assumed zero
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(68) : warning 217: loose indentation
C:\GM Satdm\GM Satdm\filterscripts\SDM.pwn(73) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
again error and warning
Re: dm1 spawn!help -
MrCallum - 02.10.2014
Line 66?
Re: dm1 spawn!help -
SWGamer - 02.10.2014
Sorry.It was a bug on your script.
Код:
#include <a_samp>
#include <streamer>
#include <sscanf>
#include <core>
#include <float>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x33CCFFAA
#define COLOR_ERROR 0xFF6A6AFF
#define COLOR_BOMB 0x96BD6AFF
enum DMINFO
{
DM1
}
new dInfo[MAX_PLAYERS][DMINFO];
public OnPlayerSpawn(playerid)
{
if(dInfo[playerid][DM1] == 1)
{
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
GivePlayerMoney(playerid, -15000);
PlayerPlaySound(playerid ,3200,0,0,0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, 24, 18000);
GivePlayerWeapon(playerid, 25, 18000);
GivePlayerWeapon(playerid, 16, 18000);
GivePlayerWeapon(playerid, 28, 18000);
GivePlayerWeapon(playerid, 31, 18000);
}
if(dInfo[playerid][DM1] == 0)
{
TogglePlayerControllable(playerid,1);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/dm1", true) == 0)
{
dInfo[playerid][DM1] = 1;
SetPlayerPos(playerid, -1314.0879,2541.4563,87.7422);
GivePlayerMoney(playerid, -15000);
SendClientMessage(playerid, COLOR_RED, ".: Your Join DM 1 :.");
PlayerPlaySound(playerid ,3200,0,0,0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 293);
GivePlayerWeapon(playerid, 24, 18000);
GivePlayerWeapon(playerid, 25, 18000);
GivePlayerWeapon(playerid, 16, 18000);
GivePlayerWeapon(playerid, 28, 18000);
GivePlayerWeapon(playerid, 31, 18000);
return 1;
}
return 1;
}
}
Re: dm1 spawn!help -
Airblog - 02.10.2014
errors fixed but all of my server commands dont work
and when i died didnt respawn in dm1!