This day i give my spawn wep but this is in packs of weapons..
[pawn]new INFO [256];[/pawn]
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
{
if (ObtenerArmas(playerid) == 0)
{
SendClientMessage(playerid, 0x333AFFF,"Choose your weapon pack - see availables packs whit !infowep");
SendClientMessage(playerid, 0x333AFFF,"!weppack 1, !weppack 2, !weppack 3, !weppack 4");
}
if (ObtenerArmas(playerid) == 1)
{
SendClientMessage(playerid, 0x333AFFF,"Given Weapon Pack # 1");
SetPlayerWeapon(playerid,21,10000);
SetPlayerWeapon(playerid,24,10000);
SetPlayerWeapon(playerid,26,10000);
SetPlayerWeapon(playerid,24,10000);
}
if (ObtenerArmas(playerid) == 2)
{
SendClientMessage(playerid,0x333AFFF,"Given Weapon Pack # 2");
SetPlayerWeapon(playerid,18,10000);
SetPlayerWeapon(playerid,21,10000);
SetPlayerWeapon(playerid,27,10000);
SetPlayerWeapon(playerid,15,10000);
}
if (ObtenerArmas(playerid) == 3)
{
SendClientMessage(playerid, 0x333AFFF,"Given Weapon Pack # 3");
SetPlayerWeapon(playerid,20,10000);
SetPlayerWeapon(playerid,25,10000);
SetPlayerWeapon(playerid,17,10000);
SetPlayerWeapon(playerid,32,10000);
}
if (ObtenerArmas(playerid) == 4)
{
SendClientMessage(playerid, 0x333AFFF,"Given Weapon Pack # 4");
SetPlayerWeapon(playerid,21,10000);
SetPlayerWeapon(playerid,18,10000);
SetPlayerWeapon(playerid,15,10000);
SetPlayerWeapon(playerid,27,10000);
SetPlayerWeapon(playerid,32,10000);
}
return 1;
}
[/pawn]
[pawn]//==============================================================================
public ObtenerArmas(playerid)
{
format(INFO,256, REGISTROS, gPlayers[playerid]);// change for the name of you folder of registers
new armas; armas = dini_Int(INFO,"WepSpawn");
return armas;
}
//==============================================================================
public DarArmas(playerid,armas)
{
format(INFO,256, REGISTROS, gPlayers[playerid]);// change for the name of you folder of registers
dini_IntSet(INFO,"WepSpawn",armas);
}
//==============================================================================[/pawn]
[pawn] else if (strcmp(cmd, "!pack", true) == 0 || strcmp(cmd, "!weppack", true) == 0) {
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) SendClientMessage(playerid,0xFFFF00AA,"[!pack - !weppack] 1/2/3/4");
else {
if (strcmp(tmp, "1", true) == 0) {
SendClientMessage(playerid,0xFFFF00AA,"Weapon pack Stubby - M4 - ingrams - Python");
DarArmas(playerid,1);
SetPlayerWeapon(playerid,21,10000);
SetPlayerWeapon(playerid,24,10000);
SetPlayerWeapon(playerid,26,10000);
SetPlayerWeapon(playerid,18,10000);
}
else if (strcmp(tmp, "2", true) == 0) {
SendClientMessage(playerid,0xFFFF00AA,"Weapon pack 2 - Python - Stubby - Ruger - Molotov ");
DarArmas(playerid,2);
SetPlayerWeapon(playerid,18,10000);
SetPlayerWeapon(playerid,21,10000);
SetPlayerWeapon(playerid,27,10000);
SetPlayerWeapon(playerid,15,10000);
}
else if (strcmp(tmp, "3", true) == 0) {
SendClientMessage(playerid,0xFFFF00AA,"Weapon Pack 3 - M60 - SPAZ - MP5 - Colt");
DarArmas(playerid,3);
SetPlayerWeapon(playerid,20,10000);
SetPlayerWeapon(playerid,25,10000);
SetPlayerWeapon(playerid,17,10000);
SetPlayerWeapon(playerid,32,10000);
}
else if (strcmp(tmp, "4", true) == 0) {
SendClientMessage(playerid,0xFFFF00AA,"Weapon Pack 4 - Stubby - Python - Molotov - Ruger - M60");
DarArmas(playerid,4);
SetPlayerWeapon(playerid,21,10000);
SetPlayerWeapon(playerid,18,10000);
SetPlayerWeapon(playerid,15,10000);
SetPlayerWeapon(playerid,27,10000);
SetPlayerWeapon(playerid,32,10000);
}
else SendClientMessage(playerid,0xFFFF00AA,"[Error] !pack- !weppack 1/2/3/4");
}
return 1;
}
[/pawn]
[pawn]
else if (strcmp(cmd, "!infowep", true) == 0 || strcmp(cmd, "!wepinfo", true) == 0) {
SendClientMessage(playerid,0xFFFF00AA,"-------- Weapon Pack --------");
SendClientMessage(playerid,0xFFFF00AA,"Weapon pack 1 - Stubby - M4 - ingrams - Python");
SendClientMessage(playerid,0xFFFF00AA,"Weapon pack 2 - Python - Stubby - Ruger - Molotov ");
SendClientMessage(playerid,0xFFFF00AA,"Weapon Pack 3 - M60 - SPAZ - MP5 - Colt");
SendClientMessage(playerid,0xFFFF00AA,"Weapon Pack 4 - Stubby - Python - Molotov - Ruger - M60");
return 1;
}[/pawn]
I hope you say me thank you....