18.06.2012, 14:02
Hey guys, basically, I have a player variable stored in a database. What I want to do is change that variable into a text script wise and display the text without overwriting the number variable, here's what I mean:
Here is the newbie script I am trying to create:
This is the empty stock that I am trying to make:
Both of these scripts are unfinished, but Im kind of stumped on how to proceed.
Here is the newbie script I am trying to create:
pawn Код:
command(n, playerid, params[])
{
new text[128];
if(loggedin == 0) return SendClientMessage(playerid, 0x66666666, "You must be logged in perform commands");
if(!sscanf(params, "s[128]", text))
{
new Name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, Name, sizeof(Name));
format(string, sizeof(string), "%s, %s: %s", HelperLevelToName(playerid), RemoveUnderScore(playerid), text);
//
return 1;
}
else return SendClientMessage(playerid, 0x66666666, "Usage: /n [Message]");
}
This is the empty stock that I am trying to make:
pawn Код:
stock HelperLevelToName(playerid)
{
switch(PVar[playerid][helperlevel]
{
case 0:
{
}
case 1:
{
}
case 2:
{
}
case 3:
{
}
}
return 1;
}