Argument type mistmach 2
#4

pawn Код:
new PlayerText3D: teks[MAX_PLAYERS], Float: Pos[3], texxt[32];
if(sscanf(params, "s[32]", texxt)) return SendClientMessage(playerid, WHITE, "USAGE:/txt [text]");
if(strlen(texxt) <= 3 || strlen(texxt) >= 20)
{
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    teks[playerid] = CreatePlayer3DTextLabel(playerid, texxt, 0x33AA33AA, Pos[0], Pos[1], Pos[2]+2, 15.0, playerid, INVALID_VEHICLE_ID);
    return 1;
}
although as texxt is a string variable now, it should return the Useage message if the length is = 0 now, so you can leave that if(strlen(texxt) ...) part away

the length of a string is checked by "strlen()" btw
https://sampwiki.blast.hk/wiki/Strlen
Reply


Messages In This Thread
Argument type mistmach 2 - by dan40o - 09.02.2015, 19:59
Re: Argument type mistmach 2 - by Sascha - 09.02.2015, 20:02
Re: Argument type mistmach 2 - by dan40o - 09.02.2015, 20:04
Re: Argument type mistmach 2 - by Sascha - 09.02.2015, 20:13
Re: Argument type mistmach 2 - by dan40o - 09.02.2015, 20:15

Forum Jump:


Users browsing this thread: 2 Guest(s)