07.02.2012, 11:45
help no gCopPlayerSpawns
code:
new Float:gRandomPlayerSpawns[2][4] = {
{-1989.020629,276.914916,35.171875,269.739929},
{-1937.786499,270.584259,41.046875,268.787506}
};
new Float:gCopPlayerSpawns[2][4] = {
{-1616.0997,681.3724,7.1875,84.5331},
{-1619.8602,691.5585,7.1875,168.7813}
};
public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid, PocketMoney);
SetPlayerInterior(playerid,0);
SetPlayerRandomSpawn(playerid);
TogglePlayerClock(playerid,1);
return 1;
}
public SetPlayerRandomSpawn(playerid)
{
if (iSpawnSet[playerid] == 1)
{
new rand = random(sizeof(gCopPlayerSpawns));
SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
}
else if (iSpawnSet[playerid] == 0)
{
new rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
}
return 1;
}
help me..
code:
new Float:gRandomPlayerSpawns[2][4] = {
{-1989.020629,276.914916,35.171875,269.739929},
{-1937.786499,270.584259,41.046875,268.787506}
};
new Float:gCopPlayerSpawns[2][4] = {
{-1616.0997,681.3724,7.1875,84.5331},
{-1619.8602,691.5585,7.1875,168.7813}
};
public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid, PocketMoney);
SetPlayerInterior(playerid,0);
SetPlayerRandomSpawn(playerid);
TogglePlayerClock(playerid,1);
return 1;
}
public SetPlayerRandomSpawn(playerid)
{
if (iSpawnSet[playerid] == 1)
{
new rand = random(sizeof(gCopPlayerSpawns));
SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
}
else if (iSpawnSet[playerid] == 0)
{
new rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
}
return 1;
}
help me..