Help please.
#3

I compiled this on my computer and it went well...

dcmd_createorg(playerid, params[])
{
tmp1[256], tmp2[256], tmp3[256], tmp4[256],Index;
tmp1 = strtok(params,Index);
tmp2 = strtok(params,Index);
tmp3 = strtok(params,Index);
tmp4 = strtok(params,Index);

name = strval(tmp1);
color = strval(tmp2);
weap1 = strval(tmp3);
weap1_ammo = strval(tmp4);

(IsPlayerAdmin(playerid))
{
(strlen(tmp1) && strlen(tmp2) && strlen(tmp3) && strlen(tmp4))
{
if oName[64];
format(oName, 64, "%s", name);

if org[256];
format(org, sizeof(org), "\\organizations\\%s.ini", oName);

(!dini_Exists(org))
{
dini_Create(org);
dini_Set(org, "Name", oName);
dini_IntSet(org, "Color", color);
dini_IntSet(org, "Weapon1", weap1);
dini_IntSet(org, "Weapon1_Ammo", weap1_ammo);
}
string[256];
format(string, sizeof(string), oName);
SendClientMessage(playerid, ORANGE, "You have created '%s'.");
}
else
{
SendClientMessage(playerid, WHITE, "USAGE: /createorg [name] [color id] [weapon1] [weapon1 ammo]");
}
}
else
{
return 1;
}
return 0;
}

If it says 1 Error still close the compiler thing and open where you saved it to and it still should be there

I swapped some things around to make it right!
Reply


Messages In This Thread
Help please. - by Anwix - 08.08.2009, 18:25
Re: Help please. - by Doppeyy - 09.08.2009, 02:22
Re: Help please. - by SampStunta - 09.08.2009, 02:38
Re: Help please. - by tanush - 24.05.2010, 03:43
Re: Help please. - by Doppeyy - 20.06.2010, 22:54

Forum Jump:


Users browsing this thread: 1 Guest(s)