new Text3D:Label[MAX_VEHICLES]; //defining the Label for everyone vehicle so we can delete it later if needed
CMD:vehtext(playerid, params[])
{
if(youradminvariable < 4) return 0;
new text[50];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You need to be in a vehicle!"); //checking if the player is inside any vehicle
if(sscanf(params, "s[50]", text)) return SendClientMessage(playerid, -1, "Correct usage: /vehtext [text]");
new car = GetPlayerVehicleID(playerid); //getting the player vehicleid and storing it in a variable
Label[car] = Create3DTextLabel(text, 0xFF0000FF, 0, 0, 0, 50.0, 0, 1); //creating the label with the text that you typed
Attach3DTextLabelToVehicle(Label[car], car, 0, 0, 0); //attacking it to the vehicle
}
C:\Documents and Settings\user\Desktop\test.pwn(4) : fatal error 100: cannot read from file: "sscanf"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
#define FILTERSCRIPT
#include <a_samp>
#include <sscanf>
new Text3D:Label[MAX_VEHICLES]; //defining the Label for everyone vehicle so we can delete it later if needed
public OnFilterScriptInit()
{
printf("\n ----------------------------");
print(" \n Texdraw Vehicle FileScript loaded");
printf("\n ----------------------------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
CMD:vehtext(playerid, params[])
{
if(youradminvariable < 4) return 0;
new text[50];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You need to be in a vehicle!"); //checking if the player is inside any vehicle
if(sscanf(params, "s[50]", text)) return SendClientMessage(playerid, -1, "Correct usage: /vehtext [text]");
new car = GetPlayerVehicleID(playerid); //getting the player vehicleid and storing it in a variable
Label[car] = Create3DTextLabel(text, 0xFF0000FF, 0, 0, 0, 50.0, 0, 1); //creating the label with the text that you typed
Attach3DTextLabelToVehicle(Label[car], car, 0, 0, 0); //attacking it to the vehicle
}
C:\Documents and Settings\user\Desktop\test.pwn(24) : error 017: undefined symbol "vehtext"
C:\Documents and Settings\user\Desktop\test.pwn(26) : error 017: undefined symbol "youradminvariable"
C:\Documents and Settings\user\Desktop\test.pwn(29) : error 017: undefined symbol "params"
C:\Documents and Settings\user\Desktop\test.pwn(34) : error 030: compound statement not closed at the end of file (started at line 24)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
if(youradminvariable < 4) return 0;
public OnPlayerCommandText(playerid, cmdtext[])
You need to get ZCMD include and #include <zcmd> at the top.
And if you don't have a saving system for Admin Level just remove the pawn Код:
Remove pawn Код:
|