PDA

View Full Version : Problem with SetPlayerMarkerForPlayer


Edw
13/07/2015, 03:49 PM
I put that when a player is spawneaza (if in paintball) to show him the players Markee arena but does not work at all
if(InPaintball[playerid] == 1)
{
SetPlayerVirtualWorld(playerid, 1);
if(PaintballGun == 1) GivePlayerWeapon(playerid, 31, 1000);
else if(PaintballGun == 2) GivePlayerWeapon(playerid, 32, 1000);
else if(PaintballGun == 3) GivePlayerWeapon(playerid, 24, 1000);
else if(PaintballGun == 4) GivePlayerWeapon(playerid, 27, 1000);
new randspawn = random(sizeof(RandomSpawnWar));
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, RandomSpawnWar[randspawn][0], RandomSpawnWar[randspawn][1], RandomSpawnWar[randspawn][2]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(InPaintball[i] == 1 && IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer( playerid, i, GetPlayerColor(i) );
SetPlayerMarkerForPlayer( i, playerid, GetPlayerColor(playerid) );
}
}
return 1;
}

MasterReturnz
13/07/2015, 08:46 PM
Try this.


if(InPaintball[playerid] == 1)
{
SetPlayerVirtualWorld(playerid, 1);
if(PaintballGun == 1) GivePlayerWeapon(playerid, 31, 1000);
else if(PaintballGun == 2) GivePlayerWeapon(playerid, 32, 1000);
else if(PaintballGun == 3) GivePlayerWeapon(playerid, 24, 1000);
else if(PaintballGun == 4) GivePlayerWeapon(playerid, 27, 1000);
new randspawn = random(sizeof(RandomSpawnWar));
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, RandomSpawnWar[randspawn][0], RandomSpawnWar[randspawn][1], RandomSpawnWar[randspawn][2]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(InPaintball[i] == 1 && IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer( playerid, i, GetPlayerColor(i) );
}
}
return 1;
}

KillerDVX
14/07/2015, 03:00 AM
if(InPaintball[playerid] == 1)
{
SetPlayerVirtualWorld(playerid, 1);
if(PaintballGun == 1) GivePlayerWeapon(playerid, 31, 1000);
else if(PaintballGun == 2) GivePlayerWeapon(playerid, 32, 1000);
else if(PaintballGun == 3) GivePlayerWeapon(playerid, 24, 1000);
else if(PaintballGun == 4) GivePlayerWeapon(playerid, 27, 1000);
new randspawn = random(sizeof(RandomSpawnWar));
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, RandomSpawnWar[randspawn][0], RandomSpawnWar[randspawn][1], RandomSpawnWar[randspawn][2]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(InPaintball[i] == 1 && IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer( playerid, i, GetPlayerColor(i) | 0x000000FF );
SetPlayerMarkerForPlayer( i, playerid, GetPlayerColor(playerid) | 0x000000FF );
}
}
return 1;
}

Edw
16/07/2015, 06:19 PM
Try this.


if(InPaintball[playerid] == 1)
{
SetPlayerVirtualWorld(playerid, 1);
if(PaintballGun == 1) GivePlayerWeapon(playerid, 31, 1000);
else if(PaintballGun == 2) GivePlayerWeapon(playerid, 32, 1000);
else if(PaintballGun == 3) GivePlayerWeapon(playerid, 24, 1000);
else if(PaintballGun == 4) GivePlayerWeapon(playerid, 27, 1000);
new randspawn = random(sizeof(RandomSpawnWar));
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, RandomSpawnWar[randspawn][0], RandomSpawnWar[randspawn][1], RandomSpawnWar[randspawn][2]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(InPaintball[i] == 1 && IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer( playerid, i, GetPlayerColor(i) );
}
}
return 1;
}


Not working.

TenTen
16/07/2015, 06:49 PM
try this

if(InPaintball[playerid] == 1)
{
SetPlayerVirtualWorld(playerid, 1);
if(PaintballGun == 1) GivePlayerWeapon(playerid, 31, 1000);
else if(PaintballGun == 2) GivePlayerWeapon(playerid, 32, 1000);
else if(PaintballGun == 3) GivePlayerWeapon(playerid, 24, 1000);
else if(PaintballGun == 4) GivePlayerWeapon(playerid, 27, 1000);
new randspawn = random(sizeof(RandomSpawnWar));
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, RandomSpawnWar[randspawn][0], RandomSpawnWar[randspawn][1], RandomSpawnWar[randspawn][2]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(InPaintball[i] == 1 && IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer( playerid, i, GetPlayerColor(i) | 0x000000FF );
SetPlayerMarkerForPlayer( i, playerid, GetPlayerColor(playerid) | 0x000000FF );
}
}
return 1;
}