Having a prob!
#1

Need help about SSCANF2!
pawn Код:
if (sscanf(params, "iiiiis", id, name, skin, wp1, a1, wp2, a2)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /createorg [orgid] [orgname] [skinid] [wep1] [am1] [wep2] [am2]");
I fill every step of it but it still says /createorg [orgid].. this same message
wats the problem pleaze, fix it then give me..
Reply
#2

pawn Код:
new id,name[50],skin,wp1,a1,wp2,a2;
if (sscanf(params, "us[50]iiiii", id, name, skin, wp1, a1, wp2, a2)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /createorg [orgid] [orgname] [skinid] [wep1] [am1] [wep2] [am2]");
Reply
#3

all those things are ids put in the player id and u will see and y iz a1 i and a2 s?

he already have the new files cuz there are no errors but iz sscanf code iz invalid
Reply
#4

pawn Код:
CMD:createorg(playerid,params[])
{
new inputtext[40];
new name = strval(inputtext);
new skin = strval(inputtext);
new wp1 = strval(inputtext);
new a1 = strval(inputtext);
new wp2 = strval(inputtext);
new a2 = strval(inputtext);
new wp3 = strval(inputtext);
new a3 = strval(inputtext);
new id = OrgsCount;
new string[140];
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
if (sscanf(params, "us[50]iiiii", id, name, skin, wp1, a1, wp2, a2)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /createorg [orgid] [orgname] [skinid] [wep1] [am1] [wep2] [am2]");
OrgsCount++;
if (OrgsCount >= MAX_ORGS) return printf("You have exceeded the MAX_ORGS- define! Aborted");
Organization[id][Name] = name;
Organization[id][Skin] = skin;
Organization[id][X] = x;
Organization[id][Y] = y;
Organization[id][Z] = z;
Organization[id][Weapons][0] = wp1;
Organization[id][Ammo][0] = a1;
Organization[id][Weapons][1] = wp2;
Organization[id][Ammo][1] = a2;
printf("Organization created: ID: %d || Name: %s",id, name);
format(string,sizeof(string),"{5CB3FF}HQ:{FFFFFF} %s\nType {5CB3FF}/org{FFFFFF} for more information!",name);
Organization[id][OrgLabel] = Create3DTextLabel(string, 0x008080FF, x, y, z, 25.0, 0);
SendClientMessage(playerid,0xD6D6D6AA,"You've made an organization");
return 1;
}
Get this and fix it now.. pleaze?
Reply
#5

It says Unknown command @ HuSSen
Reply
#6

pawn Код:
CMD:createorg(playerid,params[])
{
new id,name[50],skin,wp1,a1,wp2,a2;
if (sscanf(params, "us[50]iiiii", id, name, skin, wp1, a1, wp2, a2)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /createorg [orgid] [orgname] [skinid] [wep1] [am1] [wep2] [am2]");
new string[140];
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,Float:x,Float:y,Float:z);
OrgsCount++;
if (OrgsCount >= MAX_ORGS) return printf("You have exceeded the MAX_ORGS- define! Aborted");
format(Organization[id][Name],50,"%s",name);
Organization[id][Skin] = skin;
Organization[id][X] = x;
Organization[id][Y] = y;
Organization[id][Z] = z;
Organization[id][Weapons][0] = wp1;
Organization[id][Ammo][0] = a1;
Organization[id][Weapons][1] = wp2;
Organization[id][Ammo][1] = a2;
printf("Organization created: ID: %d || Name: %s",id, name);
format(string,sizeof(string),"{5CB3FF}HQ:{FFFFFF} %s\nType {5CB3FF}/org{FFFFFF} for more information!",name);
Organization[id][OrgLabel] = Create3DTextLabel(string, 0x008080FF, x, y, z, 25.0, 0);
SendClientMessage(playerid,0xD6D6D6AA,"You've made an organization");
return 1;
}
Reply
#7

it still says "Unknown Command".
Reply
#8

Can anyone reply at my post?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)