19.09.2009, 22:31
Sorry for double posting, but you know when you're tired and can't do anything else for tonight and doing the last thing before you go to bed? yeah...
Okay, i'm going to try and explain it..
Player enters server...
Player Block is nothing because the variable isnt set when he joins.
Player decides to make his own block, he does /block <Huja>
Player Block Variable becomes == Input (and in that case, it's Huja).
Now, this explains that : Player uses /Block Huja, and it turns the Variable (Block[playerid] to Huja, but Huja in that case was a custom input (string) so now i want /block <BLOCK NAME> to be the variable... now how the hell do you make that work..
Goodnight <3.
Okay, i'm going to try and explain it..
pawn Код:
dcmd_block(playerid, params[])
{
new
string[128];
if (sscanf(params, "s", string))
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/block <block name>\"");
} else { ScooterBlock[playerid] = string;
}
return 1;
}
Player Block is nothing because the variable isnt set when he joins.
Player decides to make his own block, he does /block <Huja>
Player Block Variable becomes == Input (and in that case, it's Huja).
Now, this explains that : Player uses /Block Huja, and it turns the Variable (Block[playerid] to Huja, but Huja in that case was a custom input (string) so now i want /block <BLOCK NAME> to be the variable... now how the hell do you make that work..
Goodnight <3.