21.02.2009, 06:23
Ok,
Trying to do deathmatch's when they player dies they respawn there,
This is what I have so far,
@ onplayerconnect
@ onplayerdeath
I have no idea what I done wrong, any suggestions.
Also I no my
the string is big but anyway.
Trying to do deathmatch's when they player dies they respawn there,
This is what I have so far,
pawn Код:
if(!strcmp(cmdtext, "/hell", true))
{
new dname[MAX_PLAYER_NAME];
new dstring[256];
new helldm == 1; // The variable
new rand = random(sizeof(BRandomSpawns));
GetPlayerName(playerid, dname, sizeof(dname));
format(dstring, sizeof(dstring), "%s Has Joined The DeathMatch(Ghost Town Of Hell)", dname);
SendClientMessageToAll(0xFFFFAEFF, dstring);
SetPlayerPos(playerid,BRandomSpawns[rand][0],BRandomSpawns[rand][1],BRandomSpawns[rand][2]);
SetPlayerHealth(playerid, 100.00);
SetPlayerArmour(playerid, 100.00);
GivePlayerWeapon(playerid, 6, 500);
GivePlayerWeapon(playerid, 26, 500);
GivePlayerWeapon(playerid, 32, 500);
GivePlayerWeapon(playerid, 41, 500);
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
helldm == 0;
return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(helldm == 1)
{
SetPlayerPos(playerid,BRandomSpawns[rand][0],BRandomSpawns[rand][1],BRandomSpawns[rand][2]);
}
return 1;
}
I have no idea what I done wrong, any suggestions.
Also I no my
pawn Код:
new dstring[256];