case 1: { // Los Santos Police Department
SetPlayerPos(playerid, 1552.6029,-1676.2701,16.1953);
SetPlayerCameraPos(playerid, 1552.6029,-1676.2701,16.1953);
SetPlayerCameraLookAt(playerid, 1552.6029,-1676.2701,16.1953);
SetPlayerColor(playerid, 0x7F7F7FFF); // Gray
SendClientMessage(playerid, 0x80FF00FF,"Los Santos Police Department!");
GivePlayerWeapon(playerid, 41, 50000);
GivePlayerWeapon(playerid, 22, 5000);
GivePlayerWeapon(playerid, 23, 500);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 43, 500);
}

AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
|
hi,
try it with AddPlayerClass. thats easier and alot shorter ![]() pawn Код:
|
|
maybe the problem is that u are giving them weapons of the same slot.
weaponid 22,23 belong both to slot 2 weaponid 41,43 belong to slot 9 See: https://sampwiki.blast.hk/wiki/Weapons I dont know if that causes the problem but id suggest u to try it out. For me the GivePlayerWeapon function works well so i dont know why ur isnt working... regards.. |
case 1: { // Los Santos Police Department
SetPlayerPos(playerid, 1552.6029,-1676.2701,16.1953);
SetPlayerCameraPos(playerid, 1552.6029,-1676.2701,16.1953);
SetPlayerCameraLookAt(playerid, 1552.6029,-1676.2701,16.1953);
SetPlayerColor(playerid, 0x7F7F7FFF); // Gray
SendClientMessage(playerid, 0x80FF00FF,"Los Santos Police Department!");
GivePlayerWeapon(playerid, 41, 50000);
//GivePlayerWeapon(playerid, 22, 5000);
//GivePlayerWeapon(playerid, 23, 500);
//GivePlayerWeapon(playerid, 29, 500);
//GivePlayerWeapon(playerid, 43, 500);
//OnGameModeInit
AddPlayerClass(299,0,0,0,0,22,100,31,300,16,3); // add skins here with AddPlayerClass
//and give them the first 3 weapons
//OnPlayerRequestSpawn
{
switch (classid)
{
case 0: //first skin u added with AddPLayerClass
{
GivePlayerWeapon(yourstuff);
}
case 1: //seccond skin and so on...
{
GivePlayerWeapon(yourstuff);
}
}
cause i dont know if u can give someone a wapons on the playerrequest.
//e.g under OnPlayerSpawn
{
switch (gTeam[playerid])
{
case 1: //team1
{
//Give ur weps here for team1
}
case 2: //team2
{
//Give ur weps here for team2
}
}